Jump to content

[SOLVED] Wildcard


wemustdesign

Recommended Posts

I am doing a query but the wildcard does not work when I use a variable for a wildcard, not sure if its the syntax.

 

Works like this:

 

$sql = "SELECT * FROM cocktails WHERE name LIKE 'a%' ORDER BY name ";

 

Doesnt work when I use a variable though:

 

$sql = "SELECT * FROM cocktails WHERE name LIKE '$get_letter%' ORDER BY name ";

 

 

Link to comment
https://forums.phpfreaks.com/topic/149116-solved-wildcard/
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.