Re: Weird Query Result

2005-04-05 Thread Mattias Håkansson
Yes, It's pretty obvious now. Thank you all for the help. Mattias Håkansson - Original Message - From: "Gabriel PREDA" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 05, 2005 12:15 PM Subject: Re: Weird Query Result > Not weird at all... > As you can see

Re: Weird Query Result

2005-04-05 Thread Roger Baklund
Mattias Håkansson wrote: Hello, I'm using MySQL 4.0.20 on Linux and I am experiencing some problems with a query result. I have the following table structure: mysql> desc gen_Lloyds_vessel; +-+--+--+-+-++ | Field | Type

Re: Weird Query Result

2005-04-05 Thread Gabriel PREDA
Not weird at all... As you can see it returnet all rows where "iImo" equals 0... that is becuase of the CAST applied... iImo is int(11) thus MySQL is casting 'FOOBAR' and the result is 0. Try: mysql> SELECT CAST('FOOBAR' AS UNSIGNED); MySQL will yell: +--+ | C