how do i reset the mysql pointer?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

how do i reset the mysql pointer?

Post by pelegk2 »

thnaks i nadvance
peleg
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Code: Select all

mysql_data_seek($result_resource, 0);
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

well i did that
i thought there is anothere way like in array's:)
y the way - isnt there like in asp+sl server that u can tell it to to to the first record?
thnaks in advance
peleg
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Well when using mysql_query() you get returned a resource identifier and not an array. You can use the array functions if you put the data into an array, the code i used on the previous post is how you go to the first result of the resource identifier.
Post Reply