Closed tortuetorche closed 11 years ago
FYI I use a PostgreSQL database. And it needs the "
(quote) character in its SQL queries.
In fact, I think that PDO adds them automagically :smile:
$sql = htmlspecialchars($sql, ENT_NOQUOTES);
If I understand it correctly: When you click on SQL tab, you see escaped entities, and not characters?
(confirm it please, so I could be sure )
If that is the case, it is a deeper problem that can't be solved just by not escaping quotes. As soon as you'll do some query with other characters that need to be escaped (like <
), you'll see the entities again.
Rather, we need to figure out why is it escaped twice, and how to handle it.
(confirm it please, so I could be sure )
Yes, that's the case.
As soon as you'll do some query with other characters that need to be escaped (like <), you'll see the entities again.
When you execute this command:
Role::where('id', '<', 1)->first();
it returns:
select * from "roles" where "id" < '1' limit 1
So, it's look fine.
I don't like it, but the commit above seems to be the simplest solution that is also future proof. Check if it fixes your issue please.
It's OK ! Thank you @Darsain :clap:
Otherwise when you execute this command:
This unreadable SQL log appears: