Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL
Author Message
drmike
Worker
Worker



Joined: Jul 15, 2004
Posts: 108
Location: Charlotte, NC

PostPosted: Sun Jan 09, 2005 12:26 am Reply with quote

Greets:

I'm trying to set up a sql query with a WHERE command that looks at the first letter of a field.

For example:

...WHERE (whatever the command is) starts 'A'...

or something like that.

Any suggestions?

Thanks,
-drmike

_________________
The Daria - Jane Conspiracy 
View user's profile Send private message Visit poster's website ICQ Number
PHrEEkie
Subject Matter Expert



Joined: Feb 23, 2004
Posts: 358

PostPosted: Sun Jan 09, 2005 12:29 am Reply with quote

WHERE this_field LIKE 'a%'

should do the job...

% is the wildcard character in MySQL

_________________
PHP - Breaking your legacy scripts one build at a time. 
View user's profile Send private message
drmike







PostPosted: Sun Jan 09, 2005 12:38 am Reply with quote

Thank you.

Been searching on the net for three hours now. *grumble*

-drmike
 
PHrEEkie







PostPosted: Sun Jan 09, 2005 1:05 am Reply with quote

drmike wrote:
Thank you.

Been searching on the net for three hours now. *grumble*

-drmike


Been there, done that Wink

You're very welcome...

PHrEEk
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©