HOME > PHP > PHP Forum > ช่วยด้วยครับ #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE article_ID = '3'' at line 1
ช่วยด้วยครับ #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE article_ID = '3'' at line 1
มันขึ้นว่า #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE article_ID = '3'' at line 1
*พอกดF12 มันก็ขึ้น Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\test\adddata1.php on line 14
ERROR !!!
$objConnect = mysql_connect("localhost","root","") or die(mysql_error());
$objDB = mysql_select_db("mydatabase1") or die(mysql_error());
$strSQL = "SELECT * FROM user WHERE Email = ".$_POST['email']."'";
$objQuery = mysql_query($strSQL or die(mysql_error()));
$objResult = mysql_fetch_array($objQuery);
$strSQL = "SELECT * FROM user WHERE Email = '".$_POST['email']."'";
สีแดงหายไป
Date :
2015-08-02 12:05:59
By :
NewbiePHP
No. 12
Guest
INSERT INTO fish (Fname,FEName,FDetail,) VALUES ('ปลา','fish','sdasdasd');
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') VALUES ('ปลา','fish','sdasdasd')' at line 1
INSERT INTO fish (Fname,FEName,FDetail,) VALUES ('ปลา','fish','sdasdasd');
เกินมาครับ
Date :
2017-02-10 11:15:09
By :
mr.win
No. 14
Guest
มันขึ้นว่า Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\shopping_cart\cart.php on line 28
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 ทำเว็บเกี่ยวกับการขายของส่งอาจารย์อะค่ะ หนูไปต่อไม่ได้เลย ส่งพรุ้งนี้แล้ว ใครรู้ช่วยหน่อยนะค่ะ
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="bootstrap/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
<?php
mysql_close();
Executing SQL script in server
ERROR: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') VIRTUAL,
PRIMARY KEY (`Stafftype`))
ENGINE = InnoDB' at line 6
SQL Code:
-- -----------------------------------------------------
-- Table `Staff_DB`.`Stafftype`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `Staff_DB`.`Stafftype` (
`Stafftype` INT NOT NULL,
`Descripton` VARCHAR(45) GENERATED ALWAYS AS () VIRTUAL,
PRIMARY KEY (`Stafftype`))
ENGINE = InnoDB
SQL script execution finished: statements: 6 succeeded, 1 failed
Fetching back view definitions in final form.
2 views were read back.
ต้องแก้ยังไงคะ