Is this redundant? {OT}
| From: | Robin Kopetzky | Date: | Mon, 06 Oct 2003 22:42:51 +0000 |
| Subject: | Is this redundant? {OT} | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-30886@lists.php.net to get a copy of this message | ||
Good afternoon.
I found this code in a program I'm renovating and think this is very
redundant. Also, it does slow queries down while doing all of the
conversions.
prod_id in the mysql database is declared an integer.
<SQL above>
where prod_id = '" . (int)$prod_id . "' and
<SQL below>
Question: since $prod_is is already an integer, why would someone convert it
into an integer, then convert it into a string to later have mysql convert
it back into an integer?? Could someone shed some light on the intent behind
this weird code??
Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020