Jump to content

Archived

This topic is now archived and is closed to further replies.

Jester

Listing query results

Recommended Posts

Merry Meet!

Now I have a big problem with php + mysql

the main source of the problem is query so I posted this up here;

My problem:

 

Now I am coding a site for recepies and I want my users to be able to list the recepies according to their first letter (ex all the recepies starting with a)

 

Now I tired really hard to the Left function but I just haven\'t been able to make sql to return the result of a query like this:

we have a column say name

I wnt eury to match up the first letter of every entry in name with the one given by the user...

 

Spent almost 3 hours playing with the \"LEFT()\" thingie but it doesn\'t work theway it should =)

 

Kind Regards

The Jester

Share this post


Link to post
Share on other sites
select * from recipes where name like \'a%\'

 

just code it to make the letter part dynamic...

Share this post


Link to post
Share on other sites

×

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.