Unexpected character. (near "$" at position 32)
Unexpected character. (near "[" at position 38)
Unexpected character. (near "]" at position 51)
Unexpected beginning of statement. (near ""UPDATE table4 SET first_name="" at position 0)
Unexpected beginning of statement. (near "$" at position 32)
Unexpected beginning of statement. (near "_POST" at position 33)
Unexpected beginning of statement. (near "[" at position 38)
Unexpected beginning of statement. (near ""first_name"" at position 39)
Unexpected beginning of statement. (near "]" at position 51)
Unexpected beginning of statement. (near "" ,last_name = 'last_name', email='email',facebook='facebook',vkon='vkon'"" at position 53)
SQL запрос:
"UPDATE table4 SET first_name=".$_POST["first_name"]." ,last_name = 'last_name', email='email',facebook='facebook',vkon='vkon'"
Ответ MySQL: Документация
#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 '"UPDATE table4 SET first_name=".$_POST["first_name"]." ,last_name = 'last_name',' at line 1
Сергей Оганезов: я писал post
UPDATE table4 SET first_name='$_POST("first_name")' ,last_name = 'last_name', email='email',facebook='facebook',vkon='vkon' не правильно
Ending quote ` was expected. (near "" at position 158)
SQL запрос:
UPDATE `users` SET `first_name`=`first_name`-1,`last_name`=`last_name'-2,`email`=`email`-3,`facebook`=`facebook`-4,`silka`=`silka`-5,`vkon`=`vkon`-6 WHERE 1=1
Ответ MySQL: Документация
#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 'email`=`email`-3,`facebook`=`facebook`-4,`silka`=`silka`-5,`vkon`=`vkon`-6 WHERE' at line 1
<?php
require 'connect.php';
$sql_select = "SELECT * FROM table4";
$result = mysql_query($sql_select);
$row = mysql_fetch_array($result);
do
{
printf("Пользователь: " .$row['first_name'] . " " .$row['last_name'] ."
Контактные данныеE-mail: " .$row['email'] . "Facebook: " .$row['facebook'] ."Вконтакте: vk---------
"
);
}
while($row = mysql_fetch_array($result));
?>
Вернуться к поиску
Добавить пользователя