Searching a MySQL DB...
| From: | Matt Greene | Date: | Mon, 20 Dec 1999 22:46:49 +0000 |
| Subject: | Searching a MySQL DB... | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-8262@lists.php.net to get a copy of this message | ||
Ok this doesnt have a lot to do with php but it uses it and i figured the
people on this list are also mysql experts also. :)
What i am asking is how can i search a column for any data that begins with
a certain letter. in other words use wildkards or somthing?
This example most likely does not work but this is just here to show you a
little mroe of what i mean:
$query = "SELECT * FROM $tbcont WHERE namef = 'A*' ";
$result = mysql_db_query( "$dbname", $query, $sqlcon);
if ($result) {
while ($r = mysql_fetch_array($result)) {
blah........
}
}