Hello!
I need advice on how to identify a row with particular field
value?
I have a table with 3 fields: id, title, date.
I need to know the order number for the row where
title=sometitle.
I need it for the $start variable in next query:
Code:
# make a query on a table in your database
// $start = ???;
$query = "SELECT * FROM table LIMIT $start,1";
$query_result_handle = mysql_query ($query)
or die ('The query failed! table_name must be a valid table
name that exists in the
database specified in mysql_select_db');
# make sure that we recieved some data from our query
$num_of_rows = mysql_num_rows ($query_result_handle)
or die ("The query: '$query' did not return any data");
print "The query: '$query' returned $num_of_rows rows of
data.<br>";
# use mysql_fetch_row to retrieve the results
$row = mysql_fetch_row ($query_result_handle);
print "The name is '$row[1]'";
What i am trying to acomplish is to get the data of the next row
of current row in which title = sometitle.
Any help/advice appreciated.
--
Vesna
http://forum.moljac.hr OBAVEZNO SKOKNITE!
__________________________________________________ _______________
Implementation is the sincerest form of flattery.