autodip
Новичок
Подскажите пожалуста где ошибка. Смотрю на запрос вроде все правильно, но ошибка идет.
Выводиться ошибка
PHP:
$ordcopy = 'INSERT INTO `orderscomplete` (`lock`,`oper`,`disp`,`ordertype`,`orderstate`,`preorder`,`roadside`,`phone`,`town`,`street`,`house`,`porch`,`apart`,`zonefrom`,`meet`,`addressfrom`,`addressto`,`townto`,`streetto`,`houseto`,`zoneto`,`route`,`suburb`,`distance`,`distcity`,`distsuburb`,`client`,`clientname`,`prefcar`,`driver`,`drivershift`,`channel`,`ordertime`,`pretime`,`driverstart`,`driverwait`,`clientringup`,`driverload`,`completetime`,`endtask`,`cash`,`dcard`,`driveupprice`,`waitprice`,`puredriveprice`,`ordersum`,`paysum`,`discount`,`carddiscount`,`drvcharged`,`opercharged`,`dispcharged`,`info`,`legend_drv`,`legend_order`,`usecldiscount`,`cldbalance`,`drvbonus`,`msgid`,`waittime`,`waitingstart`,`oldnum`,`ordercompany`,`passenger`,`ordervendor`,`stopid`,`podachatime`,`usemanualdist`,`worktime`,`closeuserid`,`linecolumn`,`ordervendorexecute`,`driverfororder`,`oper2`,`mess`,`messtime`,`ordercounts`,`addballs`,`timeorderproc`,`clientphone`,`msgidtime`,`notusecommondiscount`,`driversetorders`,`orderwasdrivers`,`javamess`,`proctime`,`carddiscountdelta`,`remotenote`,`recall`,`remotenotetime`,`remotevendorphone`,`remoteorderid`,`source` FROM `orders` WHERE `num` = :ordnum)';
$ordcopyStatement = $pdo->prepare($ordcopy);
$ordcopyStatement->bindParam(':ordnum', $ordnum);
$ordcopyStatement->execute();
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 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 'FROM `orders` WHERE `num` = '6')' at line 1' in /srv/handlerequest.php:1179
Stack trace:
#0 /srv/taxi/handlerequest.php(1179): PDOStatement->execute()
#1 [internal function]: handleRequest_Done(Array)
#2 /srv/handlerequest.php(1376): call_user_func_array('handleRequest_D...', Array)
#3 /srv/server.php(168): handleRequest(Array)
#4 /srv/server.php(129): interact(Resource id #13)
#5 /srv/server.php(78): handle_client(Resource id #6, Resource id #13)
#6 /srv/server.php(20): server_loop('localhost', 9999)