2 Replies - 890 Views - Last Post: 09 August 2012 - 08:33 AM Rate Topic: -----

#1 princemalse  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 26-October 11

MySQL problem

Posted 09 August 2012 - 01:29 AM

i have created database using MySQL in which i have table modules which include progID,title,code and credit columns both having data inserted, progID column takes values from 1 to 19 but when i run this query "SELECT * FROM modules WHERE progID=2 AND progID=18" it returns this: "MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0019 sec )" any idea
Is This A Good Question/Topic? 0
  • +

Replies To: MySQL problem

#2 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,056
  • Joined: 28-December 10

Re: MySQL problem

Posted 09 August 2012 - 02:26 AM

Try switching the "AND" to "OR".
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: MySQL problem

Posted 09 August 2012 - 08:33 AM

Moved to MySQL.

What do you get WITHOUT the WHERE clause? I.e., select * from modules?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1