Re: Re: a weired query issue

From: Date: Thu, 08 Jan 2009 21:26:55 +0000
Subject: Re: Re: a weired query issue
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-285754@lists.php.net to get a copy of this message
Nathan Rixham wrote:
viraj wrote:
i have this query.. $sql = "SELECT id FROM modules_permissions WHERE id = '" . $permissionId . "';"; when i pass the value 31 to permissionid, it returns me the 31st row of the table. and it's fine. but when i pass '31asasa' as the permissionid it returns me the same row! how come this possible? id is a integer and the storage engine is myisam. i'm on debian and mysql version is 5.0.51a-15 ~viraj
completely normal behavior; any trailing non numeric chars are stripped leaving only the numerics
normal for mysql - not normal for others ;) -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#285754) next »