Lets just try again… @Teodor @patrick
NODE JS.
I have a form… that submits to a database.
I have deleted the database connection and reconnected it and pics up the stings as integers now.
When I submit the form it should insert the data into the database because its not in the database.
eg… set the value to insert data to database and basically insert… * set value it just to i can see it in the browser window for testing.
So here is the form… I submit the data…
Then it says it is in the database… clearly its NOT…
So… why is it stopping here … because its not in the database and should have been added?
SO now i turn on the DEBUG to see why.
Then i get on the page… Query [object Object] so this is where its going funny…
So even if the data is NOT in the database it wont submit…
+++++++++++++++++++
Just to show it working… on the same logic…
Now we go to PHP
We setup the same thing… same database… same connection… as i have dont this many other times.
We have the form that submits to the database…
It working as it adding it to the database
Now i try to add the same record… and it working as expected… checking the condition… the record is there… so it does not insert it… so it working as needed…
Now FOR DEBUGGING… i first delete the “record” so that is not in the database anymore.
because we want to see what PHP outputs so that we can compare the debug outputs.
Perfect… shows the query and all good… so its working as expected…
… no if you compare that same structure… it boms out for me in Node…
check its debug… when it get to the query part… it gets to [object Object]
I am on a localhost … and using a direct database connection…
I dont know how to explain this better…
In a nutshell… the same thing works on PHP in wappler… but gives me a error in Node… but the logic remains the same…
so for some weird reason… for me…
this is where node does not do its thing for me… where php render below…