Jump to content

[SOLVED] Get any record where the first letter is X


papaface

Recommended Posts

Hi,

Regulars have probably seen this answered hundreds of times but how do you get records with the first letter beginning with 'a' for example?

I have this:

$letter = $_GET['l']; // = a
$query = mysql_query('SELECT alias FROM badmembers WHERE alias RLIKE "^'.$letter.'$"');

 

But it doesnt seem to work....

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.