On Wed, 14 Aug 2002, [iso-8859-1] CÚsar Aracena wrote:

> Thanks. I must apology as I made a mistake when writing the incoming
> variable's name. I had it wrong so it would pass the variable but the
> incoming script was looking for a variable that wasn't passed. In the
> meantime, and now that I correct that, I'm still comparing artid to
> '$artid' (with single quotes) and it does it well... it is an int(4)
> field and now that you mention it... how is it possible?

MySQL lets you compare numbers and strings pretty liberally:

mysql> create table foo (x int, y double);
Query OK, 0 rows affected (0.02 sec)

mysql> insert into foo values (1, 3.1415);
Query OK, 1 row affected (0.09 sec)

mysql> select * from foo where x = '1';
+------+--------+
| x    | y      |
+------+--------+
|    1 | 3.1415 |
+------+--------+
1 row in set (0.01 sec)

mysql> select * from foo where y like '3.14%';
+------+--------+
| x    | y      |
+------+--------+
|    1 | 3.1415 |
+------+--------+
1 row in set (0.00 sec)



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to