Hi,

need some help with the code below. I am thinking of reusing this for
building a thumbnail gallery from a database.

First, is the code actually good? Do i do something that will slow down the
responses?

Second, can anyone help me with a code sample to implement that will limit
how many records the query is displaying? (break the database response into
pages)

Third, any good ideas on how to do this the easiest way is appreciated :)

Thanks!
- Daniel


$db = mysql_connect("localhost", "xxx", "xxx");

mysql_select_db("xxx",$db);

$result = mysql_query("SELECT * FROM film WHERE artnr LIKE '$avd'",$db);

if ($myrow = mysql_fetch_array($result)) {

echo "<TABLE cellSpacing=3 cellPadding=5 width=600 border=0>\n";
echo "<TR><TD><span class='text2'>Art.nr</span></TD>\n";
echo "<TD><span class='text2'>Titel</span></TD>\n";
echo "<TD><span class='text2'></span></TD></TR>\n";

do {

printf("<TR><TD bgColor=#efefef><span class='text'>%s</span></TD>
<TD bgColor=#efefef><span class='text'><b>%s</b></span></TD>
<TD bgColor=#efefef><span class='text'>%smin</span></TD>
</TR>\n", $myrow["artnr"], $myrow["titel"], $myrow["dur"]);

} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";

} else {
echo "<span class='text2'>No records available...</span>";
}

# Daniel AlsÚn    | www.mindbash.com #
# [EMAIL PROTECTED]  | +46 704 86 14 92 #
# ICQ: 63006462   |                  #


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to