Jump to content

php LIKE


cip6791

Recommended Posts

$result = mysql_query("SELECT * FROM xzclf_cats WHERE catname LIKE 'A%'");

 

$row = mysql_fetch_array($result) or die(mysql_error());

 

while($row = mysql_fetch_array($result)){

echo $row['catname'];

echo "<br />";

}

echo "Hello!";

?>

 

I am using the code above to get the catnames that start with the letter A. And it is not displaying anything. the Hello! echo is displaying.

 

Can anybody give me a hand?

 

Thank you.

Link to comment
https://forums.phpfreaks.com/topic/115687-php-like/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.