Possible bug: filter mail_domain by server_id

Discussion in 'Developers' Forum' started by maumar, Mar 19, 2014.

  1. maumar

    maumar Member

    I am trying to select all mail domains belonging to a server using panel.
    Server has name 'mail1.xxx.xxx.net' and server_id is = 3.
    I have more then 70 server.
    I have got mail domains of many servers.
    So, I have enabled mysql log and this is the select I noted:

    Code:
     SELECT mail_domain.* FROM mail_domain WHERE  mail_domain.server_id like '%3%'  ORDER BY mail_domain.domain LIMIT 0, 15
    
    This select is wrong.

    mail_domain.server_id is UNSIGNED INT, so you should not use 'like'.
    This way u are selecting:
    server_id =3
    server_id = 13
    etc etc

    If I was not clear I could explain further.

    Best Regards


    [​IMG]


    [​IMG]
     
    Last edited: Mar 19, 2014
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thank you for the bugreport. The list column had a wrong datatype. I fixed the issue in the git stable branch.
     

Share This Page