I have build a browse edit form.
After a user saves data, I want to execute a sql query which contains the values, that the user just entered.
However, I only get empty values using PHP:
Trying to execute this:
Code: Select all
$s = "insert into dashboard (id, project_name ) VALUES (" . nuLookupRecord()->id . ", '" . nuLookupRecord()->project_name . "');";
nuRunQuery($s);
Does somebody know, what I am doing wrong?[0] :
===USER==========
globeadmin
===PDO MESSAGE===
SQLSTATE[42000]: Syntax error or access violation: 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 ' '')' at line 1
===SQL===========
insert into dashboard (id, project_name ) VALUES (, '');
===BACK TRACE====
/var/www/html/nubuilder/nucommon.php(1254) : eval()'d code - line 2 (nuRunQuery)
/var/www/html/nubuilder/nucommon.php - line 1254 (eval)
/var/www/html/nubuilder/nudata.php - line 365 (nuEval)
/var/www/html/nubuilder/nuapi.php - line 52 (nuUpdateDatabase)
Thank you very much!
Cheers,
Malte