
07-07-2007, 20:35
|
|
|
|
חבר מתאריך: 14.03.07
הודעות: 13
|
|
|
[PHP]עזרה בהצגת טבלה. לא מציג טבלה של המשתמשים
יש לי בעיה בלולאה while בשורה 19. זה לא רושם לי בגלל הבעיה הזו את הטבלה שצריכה להיות מוצגת.
קוד PHP:
<html> <head> <title>testing2</title> </head> <body> <?php $user = "user"; $pass = "pass"; $host = "localhost"; $link = mysql_connect($host, $user, $pass); if (!$link) die ("Coulsdn't connect to MYSQL"); mysql_select_db($user, $link) or die("Couldn't open $db: ".mysql_error()); $result = mysql_query("select * from domains" ); $num_rows = mysql_num_rows($result); print "there are currectly $num_rows in the table<p>"; print "<table border=1>"; while($a_row + mysql_fetch_rows($result)) { print "<tr>\n"; foreach ($a_row as $field ) print "\t<td>$field</td>\n"; print "</tr>\n"; } print "</table>\n"; mysql_close($link) ?> </body> </html>
זה רושם
קוד:
there are currectly 19 in the table
Fatal error: Call to undefined function: mysql_fetch_rows() in /home/barak100/domains/barak1.il-il.com/public_html/test2.php on line 19
|