Jump to content

Select statement question


Dawie

Recommended Posts

Hi,

I have a simple table:

id surname

1 gastrow

2 gilmer

3 green

4 greenwood

5 gunther

(sorted in surname)

When the user types in \"gr\" and clicks \"go\" the select statement should return \"green\" and \"greenwood\" I\'m using:

\"SELECT * FROM table WHERE surname >= \'$surname\'\"

but this also returns \"gunther\" which is incorrect.

Anybody with advice please?

Thanks

Link to comment
https://forums.phpfreaks.com/topic/1279-select-statement-question/
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.