This topic is locked
[SOLVED]

 Custom Query works in SQL not in phprunner

3/17/2016 1:26:56 PM
PHPRunner General questions
G
g_parry author

Hi
I am trying to write a very simple custom query:
CustomQuery("UPDATE permits SET printed = 'No', WHERE ID = ".$keys["ID"]);
It works perfectly when I run it through SQL in phpmyadmin but through phprunner I get a sql error
Technical information

Error type 256

Error description 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 'WHERE ID = 2' at line 1

URL localhost/Change_Vehicle_edit.php?submit=1&fly=1&editid1=2&

Error file C:\Users\Glenn\Documents\PHPRunnerProjects\maidstone_permitsv62v80v811\output\connections\MySQLiConnection.php

Error line 142

SQL query UPDATE permits SET printed = 'No', WHERE ID = 2
Any help appreciated

L
laonian 3/17/2016

Try to remove the comma and see if it works.

G
g_parry author 3/17/2016



Try to remove the comma and see if it works.


Yep - thanks for that works perfectly now. No idea how I missed that and I obviously didn't didn't have it when I ran the SQL query