Yii Framework Forum: Is this a mysql bug? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Is this a mysql bug? SQL Query not displaying the good answear Rate Topic: -----

#1 User is offline   fouss 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 385
  • Joined: 05-October 10
  • Location:Bamako Mali

Posted 14 May 2012 - 08:30 AM

This is my SQL query
SELECT * 
FROM `article` 
WHERE publie =1

But it gives me the result with publie value=0

I did it several times but the same probleme.

Any idea?
Posted Image
0

#2 User is offline   Mustafa Abu Ghali 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 08-April 12

Posted 14 May 2012 - 08:42 AM

check for "publie" in the DB type.
Is publie is int ?


Thanks,

Mustafa
0

#3 User is offline   fouss 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 385
  • Joined: 05-October 10
  • Location:Bamako Mali

Posted 14 May 2012 - 08:51 AM

Solved!
It was enum type so I added cote like this

SELECT * FROM `article` WHERE publie ='1'


thx!
Posted Image
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users