Re: PHP+MySQL=Help(?)
| From: | Justin French | Date: | Wed, 31 Oct 2001 10:32:31 +0000 |
| Subject: | Re: PHP+MySQL=Help(?) | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-72998@lists.php.net to get a copy of this message | ||
Hi,
from this command line test:
> select imglocation,height,width from img where imgname='alfstag1'
it looks to me like your imgname field is *characters* rather than *numbers*.
when ever I'm doing something like this (eg WHERE firstName="justin"), I
do it with a LIKE statement, rather than with a "=".
example:
$query = "SELECT imglocation,height,width FROM img WHERE imgname LIKE
\"$getimg\"";
So, I'd recommend giving that a try. From my understanding (limited) of
MySQL, use = in the case of $id=2, and LIKE in the case of firstName
LIKE "justin".
Justin French