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

#4
(01-30-2019, 07:17 AM)kilishan Wrote: 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.

test again on fresh/clean install, but your queries doesnt work ( except the last one, because the string is used as array )
here test yourself : https://drive.google.com/open?id=1Ghmzla...dMZ2Im-MRC
1. update database config ( used test/test )
2. create the session table in your database
3. open http://localhost/clean/public

@InsiteFX it makes no different
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.