Jump to content


Photo

Un-precise mysql querying


  • Please log in to reply
2 replies to this topic

#1 Tandem

Tandem
  • Members
  • PipPipPip
  • Advanced Member
  • 251 posts

Posted 22 July 2006 - 08:56 PM


SELECT * FROM EXAMPLE WHERE USER='T';

I want the search to return every 'USER' that begins with a T. I'm pretty sure i have to add a character after the T but can't remember which, and the syntax for doing it.

I read somewhere about how to do this a while back but forgot how, and my google searches are returning irrelevant results.

Thanks for any help...


#2 JaGeK

JaGeK
  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationNRW, Germany

Posted 22 July 2006 - 09:04 PM

I want the search to return every 'USER' that begins with a T. I'm pretty sure i have to add a character after the T but can't remember which, and the syntax for doing it.

You're probably searching for LIKE:

-> http://www.w3schools...l/sql_where.asp

#3 Tandem

Tandem
  • Members
  • PipPipPip
  • Advanced Member
  • 251 posts

Posted 22 July 2006 - 09:27 PM

Thanks, that was what i was looking for :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users