RE: [PHP-DB] mysql wildcard
| From: | (Edward Peloke) | Date: | Thu, 09 Jan 2003 14:22:41 +0000 |
| Subject: | RE: [PHP-DB] mysql wildcard | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-24697@lists.php.net to get a copy of this message | ||
Thanks!
select * from offtime where type='%' didn't work but when I change = to
'like' it works great!
Thanks,
Eddie
-----Original Message-----
From: Marco Tabini [mailto:marcot@tabini.ca]
Sent: Wednesday, January 08, 2003 4:57 PM
To: Edward Peloke
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] mysql wildcard
You probably want something like:
select * from offtime where type like '{$type}%'
As a side note, are you making sure that $type does not contain any
malicious code?
Cheers,
Marco
--
----------------
php|architect - The Monthly Magazine for PHP Professionals
Come check us out on the web at http://www.phparch.com!