RE: [PHP] Re: A stupid question...

2002-03-11 Thread Collins, Robert
Original Message- From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 4:31 PM To: Rick Emery; 'Chuck "PUP" Payne'; liljim Cc: PHP General Subject: RE: [PHP] Re: A stupid question... $result =mysql_query("SELECT * FROM emply_info WHER

Re: [PHP] Re: A stupid question...

2002-03-11 Thread liljim
You're using the wildcard in the wrong place. Should be "like '$letter%'"; Or, "left(column, 1) = '$letter'"; use a die() and mysql_error() to report problems to the browser: $result =mysql_query("SELECT * FROM emply_info WHERE LEFT(Lname, 1) = '$letter' ORDER BY Lname, Fname DESC",$db)

RE: [PHP] Re: A stupid question...

2002-03-11 Thread Rick Emery
I just noticed your WHERE clause is incomplete. -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 4:33 PM To: 'Chuck "PUP" Payne' Cc: PHP General Subject: RE: [PHP] Re: A stupid question... To help you diagnose the problem

RE: [PHP] Re: A stupid question...

2002-03-11 Thread Rick Emery
ther your query is what you expected (2) what mysql didn't like about your query -Original Message- From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 4:31 PM To: Rick Emery; 'Chuck "PUP" Payne'; liljim Cc: PHP General Subject: RE:

RE: [PHP] Re: A stupid question...

2002-03-11 Thread Chuck \"PUP\" Payne
'Chuck "PUP" Payne'; liljim Cc: PHP General Subject: RE: [PHP] Re: A stupid question... What do you mean " it doesn't like the "LIKE" Please provide the query statement you used and the response from the application -Original Message- From: Chuck

RE: [PHP] Re: A stupid question...

2002-03-11 Thread Rick Emery
What do you mean " it doesn't like the "LIKE" Please provide the query statement you used and the response from the application -Original Message- From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 4:22 PM To: liljim Cc: PHP Ge

Re: [PHP] Re: A stupid question...

2002-03-11 Thread Chuck \"PUP\" Payne
Ok, I have tried this but no luck...I have included the page I have been working on. I have it list everything now but last name. # This what I want to change so that I can do it by letter # $result =mysql_query("SELECT * FROM emply_info ORDER BY Lname, Fname DESC",$db); I have tried everything

RE: [PHP] Re: A stupid question...

2002-03-11 Thread Tim Ward
hat one. Tim Ward Internet chess www.chessish.com <http://www.chessish.com> -- From: Chuck "PUP" Payne [SMTP:[EMAIL PROTECTED]] Sent: 11 March 2002 02:59 To: Cary; mysql lists.mysql.com Cc: PHP General Subject: Re: [PHP] Re: A stu

RE: [PHP] Re: A stupid question...

2002-03-11 Thread Niklas Lampén
An option too: SELECT * FROM table WHERE SURNAME LIKE 'a%' ORDER BY surname ASC Niklas -Original Message- From: liljim [mailto:[EMAIL PROTECTED]] Sent: 11. maaliskuuta 2002 11:09 To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: A stupid question... Hi chuck, use left() ass

Re: [PHP] Re: A stupid question...

2002-03-11 Thread liljim
Hi chuck, use left() assuming your column is called "name", then something like this will do: $letter = "a"; $get = @mysql_query("SELECT * FROM table WHERE LEFT(surname, 1) = '$letter' ORDER BY surname ASC"); That should get out all of the fields beginning with a or A and list them alphabetic

RE: [PHP] Re: A stupid question...

2002-03-10 Thread Demitrious S. Kelly
lists.mysql.com Cc: PHP General Subject: Re: [PHP] Re: A stupid question... I want to sort by a letter in a colomn. Let say I want to sort the colomn last_name. I can do order by but I can do just the A's. http://www.myserver.com/mysort.php?Letter=A Like to create a link on a web "A&qu

Re: [PHP] Re: A stupid question...

2002-03-10 Thread michael kimsal
Chuck "Pup" Payne wrote: > I want to sort by a letter in a colomn. Let say I want to sort the colomn > last_name. I can do order by but I can do just the A's. > > http://www.myserver.com/mysort.php?Letter=A > > Like to create a link on a web "A" then sort only the last name are A. > > I hope t

Re: [PHP] Re: A stupid question...

2002-03-10 Thread Chuck \"PUP\" Payne
I want to sort by a letter in a colomn. Let say I want to sort the colomn last_name. I can do order by but I can do just the A's. http://www.myserver.com/mysort.php?Letter=A Like to create a link on a web "A" then sort only the last name are A. I hope that's helps. I can order by, but I can't

Re: [PHP] Re: A stupid question...

2002-03-10 Thread Chuck \"PUP\" Payne
I want to sort my a letter in a set colomn. Let say I want to sort the colomn last_name http://www.myserver.com/mysort.php?Letter=A Like to create a link like A then sort only the last name ore what ever I want to sort by that letter. I hope that's helps. I can order by, but I can't so a sort l