-4

Hi I am getting this error in mySql for this query below. Can anybody help me with this. Thanks.

MySQL Error:


190

SQL:
            SELECT `pid`, `pushbadge`, `pushalert`, `pushsound`
            FROM `apns_devices`
            WHERE `pid` IN ()
                AND `status`='active';

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND status='active'' at line 3 Error #: 1064

Michael Berkowski
  • 267,341
  • 46
  • 444
  • 390
reza23
  • 3,079
  • 2
  • 27
  • 42

1 Answers1

1

You should add some values into statement IN () like this:

    SELECT `pid`, `pushbadge`, `pushalert`, `pushsound`
    FROM `apns_devices`
    WHERE `pid` IN (1,2,3)
        AND `status`='active';

See more http://www.mysqltutorial.org/sql-in.aspx

ksiger
  • 313
  • 1
  • 9