Support the ongoing development of Laravel.io →
posted 10 years ago
Database

Either there is a quite dangerous bug in laravel or I just made a stupid assumption.

I believe that the following code: DB::statement(" INSERT INTO sometable (question, id) VALUES ('?',?)", array('random question?',1234)); should result in the execution of this SQL statement: SQL: INSERT INTO sometable (question, id) VALUES ('howyadoin?',1234); but instead laravel executes this: SQL: INSERT INTO sometable (question, id) VALUES ('howyadoin1234',?);

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

selujtje selujtje Joined 24 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.