Re: A weird images database/web page problem

From: Date: Fri, 18 Jan 2002 04:27:46 +0000
Subject: Re: A weird images database/web page problem
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-15962@lists.php.net to get a copy of this message
The next part I tackled and won! Hard to believe actually, but I got the problem with last page fixed. On Tuesday 15 January 2002 10:20 pm, Steven Cayford banged out on the keys: > To find out if $new_pic pointed to a valid image you would probably need > to do a "select count(*) from ab" to get the total number of records. If > $new_pic is less than the count, then show the link. I did incorporate the count(*) function to show a total number of pics in each database, at the bottom of the page with the page and home links. Here is the code I used to fix the last page problem - $result=mysql_query($sql) or die ("The query didn't work, oops"); if (mysql_num_rows($result) == 0) { echo "<tr>\n<td colspan=\"6\" align=\"center\">\n<font size=\"+2\">Oops, you've reached the end of the line.\n<br>\n<a href=\"../index.html\">Home</a></font>"; } else { while ($row=mysql_fetch_array($result)) { the rest of the code..... And it works great. That takes care of the two questions I had to begin with. Thanks for the help, I appreciate your kindness and patience, sometimes even the best books and manuals fall a bit short of such common, simple or mundane tasks. -- Chip W www.wiegand.org <+><+><+><+><+><+><+><+> Windows 95/NT - 32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor, written by a 2 bit company that can't stand 1 bit of competition. <+><+><+><+><+><+><+><+>

« previous php.db (#15962) next »