MeekroDB - White spaces are removed with "%s" placeholder

74 Views Asked by At

I'm new to MeekroDB. I have this line:

DB::query("INSERT INTO order (id, state) VALUES (%i, %s)", $id, $state);

where for example $state = "order paid and delivered". The problem is that when I execute the query and then go to look in the database, I see state column with value "orderpaidanddelivered" (without spaces). Where am I doing wrong?

1

There are 1 best solutions below

0
On

Run the command below at the top of your script, and all SQL queries will be echoed out onto your page. This makes it easy to get an overview of the queries you're running.

DB::debugMode();