(newbi)mySQL query question
| From: | webmaster at tececo dot com | Date: | Sat, 18 May 2002 13:27:09 +0000 |
| Subject: | (newbi)mySQL query question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-98252@lists.php.net to get a copy of this message | ||
This doesn't have a huge amount to do with PHP but,
I have the following code for my SQL query:
$query = "SELECT code FROM links WHERE sort_text = $letter*";
I get an error.
What I want to do is be able to specify a letter and have the rest be undefined eg
if $letter was t
I would get TecEco, Tiny, and Trailer
and if $letter was b I would get Basket and Ball.
Could any one show me the correct syntax off their heads?JJ Harrison
webmaster@tececo.com
www.tececo.com