?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Re: selecting lowest number in mysql
Author:?evan?(216.191.169.---)
Date:???03-03-03 10:28

now, how would i delete that value from mysql.

i try using a for to display the results but it returns nothing.

$query = "select MIN(newsid) as min_number from worldsBestNews";
$result = mysql_query($query);
$num_results = mysql_num_rows ($result);

for ($i=0; $i<$num_results; $i++) {
$row = mysql_fetch_array ($result);
$newsid = $row['newsid'];
echo "news id = $newsid";
}

this should display the lowest number in the auto increment field but it displays nothing.

?Topics Author? Date
?selecting lowest number in mysql??new
evan 03-03-03 08:52?
?Re: selecting lowest number in mysql??new
fred 03-03-03 09:39?
?Re: selecting lowest number in mysql??new
evan 03-03-03 10:28?
?Re: selecting lowest number in mysql??new
fred 03-03-03 10:51?
?Re: selecting lowest number in mysql??new
evan 03-03-03 11:02?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > now, how would i delete that value from mysql. > > i try using a for to display the results but it returns > nothing. > > $query = "select MIN(newsid) as min_number from > worldsBestNews"; > $result = mysql_query($query); > $num_results = mysql_num_rows ($result); > > for ($i=0; $i<$num_results; $i++) { > $row = mysql_fetch_array ($result); > $newsid = $row['newsid']; > echo "news id = $newsid"; > } > > this should display the lowest number in the auto increment > field but it displays nothing. ">??

Provided By
Phorum