how display record without looping???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aris1234
Forum Newbie
Posts: 11
Joined: Mon May 07, 2007 7:10 am

how display record without looping???

Post 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 ??
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'm having a tough time understanding your question. Please explain further, maybe with examples.
aris1234
Forum Newbie
Posts: 11
Joined: Mon May 07, 2007 7:10 am

Post 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 ??
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply