Page 1 of 1

how display record without looping???

Posted: Tue Sep 11, 2007 2:31 pm
by aris1234
Hi All...


i have table in DB like this :

---------------------------------------
ID | name | date | time
----------------------------------------
1 42 09-20-2007 08pm
2 42 09-21-2007 09pm
3 42 09-22-2007 12pm
4 162 09-23-2007 11pm
----------------------------------------------

how display data in cell 09-22-2007

if use code like this

Code: Select all

select * table where ID='3'
that work just once because if delete that ID can't display again and ID auto incrementr too
so user don't know the ID??

*name retrive for diferent table ID so name like number

have ID ..please help ??

Posted: Tue Sep 11, 2007 2:33 pm
by feyd
I'm having a tough time understanding your question. Please explain further, maybe with examples.

Posted: Tue Sep 11, 2007 2:54 pm
by aris1234
i mean like this :

how to display data in table with no ID 3 and field date 09-22-2007

because no ID auto increment so we can't this code

Code: Select all

select * from tabel where id='3'
have idea ??

Posted: Tue Sep 11, 2007 2:59 pm
by feyd
You don't have to select records individually. For example, WHERE clauses aren't required, however it will result in all records of the table being returned.