bober
3/7/2005 7:13:00 PM
ìáÍÅÒÓËÉÊ ×ÏÐÒÏÓ , ÎÏ ×ÓÅ ÖÅ
ÅÓÔØ ËÏÄ
mysql_connect();
mysql_select_db("test");
mysql_query("create table gbook(id int,a text)");
mysql_error();
for($i=0;$i<=10;$i++)
{
$id =time();
mysql_query("insert into gbook(id,a) values($id,'No?$i')");
}
$r=mysql_query("select * from gbook");
for($i=0; $i<=mysql_num_rows($r);$i++)
{
$f=mysql_fetch_array($r);
echo "$f[id]->$f[a]<br>\n";
}
ÔÁÂÌÉÃÕ gbook ÓÏÚÄÁÅÔ , ÎÏ ÎÉÞÅÇÏ × ÎÅÅ ÎÅ ÚÁÐÉÓÙ×ÁÅÔ, Á ×Ù×ÏÄÉÔ ÓÌÅÄÕÝÅÅ:
Warning: mysql_query(): Unable to save result set in e:\program files\apache
group\apache\www\mysql.php on line 19
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in e:\program files\apache group\apache\www\mysql.php on line 20
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in e:\program files\apache group\apache\www\mysql.php on line 22
->
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in e:\program files\apache group\apache\www\mysql.php on line 20
÷ ÞÅÍ ÐÒÉËÏÌ.
úÁÒÁÎÅÅ ÓÐÁÓÉÂÏ.