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/2004

RE: Selecting non opposites

2004-03-22 Thread Diana Cristina Neves Soares
To select random values you could use: SELECT word FROM table ORDER BY rand() LIMIT 3 But the problem of not to select male and female together... Well, you could LIMIT your query to 4 and in your code, if one entry is one of male or female, you test the others not to be female or male

RE: create own auto increment number

2003-11-25 Thread Diana Cristina Neves Soares
I think it is not possible to have things as you stated, but you could have an auto_increment field and a date field in your table. Every time you insert a record, you set the date field and the other field will auto_increment himself. Then, when you want to do a select, you may do as: