Re: MySQL help
| From: | Michael Brunson | Date: | Sat, 16 Dec 2000 03:21:16 +0000 |
| Subject: | Re: MySQL help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30645@lists.php.net to get a copy of this message | ||
On 15 Dec 2000 16:26:11 -0800, md261897@oak.cats.ohiou.edu (Marc
Davenport) wrote:
>I'm trying to query a mysql database and have it only return values that
>start with a certain letter.
>my current query setup is this
>
>$alpha_temp= $alpha . '*';
>$query="SELECT * FROM $mysql_table_member_list WHERE COMPANY='$alpha_temp'
>ORDER BY COMPANY";
>
>$alpha is just a single character, ie 'a'
>$alpha_temp was an attempt at using wild cards.
>
>Does anyone understand me?
>can anyone help?
$query = "SELECT * FROM "
. $mysql_table_member_list
. " WHERE COMPANY LIKE '"
. $alpha
."%' ORDER BY COMPANY";
HTH
--
Michael Brunson 504.473.6643
brunson@intercosmos.com ICQ: 83163789
<? Special Projects Programming Manager ?>
--- Intercosmos Media Group, Inc. ---
www.intercosmos.com www.directnic.com