• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Escaping broke query

#2
The first one works just fine for me in a real-world situation. I have a simple table with columns id, and name. The following queries all work for me:

Code:
$db = db_connect();
session(); // Automatically starts the session, but also ran with session()->start();

$db->query("select * from users where id = ? ", ['1']);
$db->query("select * from users where id = ? ", [1]);
$db->query("select * from users where name = ? ", ['Fred']);

The second example is impossible to duplicate without knowing your table structure, but as the first one works just fine, I'd suggest triple-checking your code and the queries that are getting generated.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply


Messages In This Thread
Escaping broke query - by puschie - 01-30-2019, 12:45 AM
RE: Escaping broke query - by kilishan - 01-30-2019, 07:17 AM
RE: Escaping broke query - by InsiteFX - 01-30-2019, 09:42 AM
RE: Escaping broke query - by puschie - 01-31-2019, 01:33 AM
RE: Escaping broke query - by kilishan - 01-31-2019, 10:36 PM
RE: Escaping broke query - by puschie - 02-01-2019, 02:27 AM
RE: Escaping broke query - by puschie - 02-11-2019, 05:46 AM
RE: Escaping broke query - by puschie - 02-14-2019, 01:45 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.