0
SELECT GROUP_CONCAT(DISTINCT REPLACE(CONCAT(REPLACE(REPLACE(REPLACE(a.user, '[', '') , ']', '') , '"', '')),'0,','')) as email
    from car a
    INNER JOIN pct b on b.id = a.idcarr
    where irt = 1.3.4 AND b.id = 96

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.4 AND b.id = 96 LIMIT 0, 25' at line 4

Kain
  • 15
  • 5
  • `irt = 1.3.4` should be `irt = '1.3.4'` – Nick Apr 10 '20 at 01:24
  • $irt = $_REQUEST['irt']; where irt = $irt AND b.id = $idcar"; What should I do here? – Kain Apr 10 '20 at 02:06
  • Put single quotes around `$irt`: `where irt = '$irt'` – Nick Apr 10 '20 at 02:08
  • 1
    You should use prepared statements. That will save you from this sort of issue. See https://stackoverflow.com/questions/60174/how-can-i-prevent-sql-injection-in-php – Nick Apr 10 '20 at 02:37

0 Answers0