Hi there,
I am performing the following queries on a pretty large table (51 million
rows, myisampacked, couple of gigs):
SELECT * FROM foo WHERE char_field = '96' AND int_field = 1;
SELECT * FROM foo WHERE char_field = 96 AND int_field = 1;
Is it the expected behaviour for the second query to perform a numerical
equivalence test on every row in the table in turn? It is returning rows
with values like '096', '96foo' and the like.
I had previously assumed that (when dealing with a CHAR field) you did not
need to quote numbers.
Please could you CC: any replies to me as I am no longer on the list.
Many Thanks,
Corin
/------------------------+-------------------------------------\
| Corin Hartland-Swann | Tel: +44 (0) 20 7491 2000 |
| Commerce Internet Ltd | Fax: +44 (0) 20 7491 2010 |
| 22 Cavendish Buildings | Mobile: +44 (0) 79 5854 0027 |
| Gilbert Street | |
| Mayfair | Web: http://www.commerce.uk.net/ |
| London W1K 5HJ | E-Mail: [EMAIL PROTECTED] |
\------------------------+-------------------------------------/
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php