Re: select statement not working in a php page

2004-03-22 Thread beacker
>I am trying to get a single result from a database, which works fine at >the sql command line. I have tried several versions of code, this being >the most recent - ... >No matter what I do I do not get the desired max id number from the column >WarrantyID. The same query works fine at the sql c

Re: select statement not working in a php page

2004-03-22 Thread Chip Wiegand
Thanks for the tip. Got it working. -- Chip "Rick Emery" <[EMAIL PROTECTED]> wrote on 03/22/2004 09:50:59 AM: > What result are you getting? > > First off, I see that your HTML is possibly incorrect; should it be: > echo "Warranty ID:\n"; > > is a table header. > > Second, if you are expectin

RE: select statement not working in a php page

2004-03-22 Thread Diana Cristina Neves Soares
Hi, Assuming that you are connecting to the mysql server with success, try just changing your query to: $sql = "select max(WarrantyID) as WarrantyID from warrantycopy"; Hope this helps, Diana Soares -Original Message- From: Chip Wiegand [mailto:[EMAIL PROTECTED] Sent: Mon 3/22/200

Re: select statement not working in a php page

2004-03-22 Thread Rick Emery
What result are you getting? First off, I see that your HTML is possibly incorrect; should it be: echo "Warranty ID:\n"; is a table header. Second, if you are expecting a single result row, then you do not need the while() loop. Do a single fetch and display the result. rick "People will for