|
|
|
สอบถามปัญหา ติด error ครับ ++++$num=mysql_num_rows($result); |
|
|
|
|
|
|
|
Code (PHP)
<?php
$host="localhost";
$user="root";
$passwd="666666";
$dbname="register";
mysql_connect($host,$user,$passwd) or die("?????? Host ????????????");
mysql_select_db($dbname) or die("?????????????????????");
$sql="insert into 'userinfo' ('logname','pw','name','address','age','gender','ads','hobby1','hobby2','hobby3','hobby4','hobby5')
values('$logname','$psswd','$name','$address','$age','$gender','$Uknow','$hobby1','$hobby2','$hobby3','$hobby4','$hobby5')";
mysql_query("set NAMES tis620");
$sqlquery=mysql_db_query($dbname,$sql);
$checkadd="select * from 'userinfo' where logname='$logname'";
$result=mysql_db_query($dbname,$checkadd);
$num=mysql_num_rows($result);
if($num==1)
{
print"<??????????????????????????????????????????????>";
}
mysql_close();
?>
++++$num=mysql_num_rows($result); ++++ พอดีมันแจ้ง error บรรทัดนี้ครับ พอจะแก้ยังไงครับ ขอบคุณครับ
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2011-03-30 14:15:36 |
By :
niggadiam |
View :
895 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$checkadd="select * from 'userinfo' where logname='$logname'";
ลบ '' ออกค่ะ
|
|
|
|
|
Date :
2011-03-30 14:36:48 |
By :
Pep_Fare |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|