Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- @rownum := @rownum + 1 rownum,
- tour_foreign.id,
- tour_foreign.name,
- tour_foreign.airline,
- MIN(tour_foreign_residence.name_re) AS name_re,
- tour_foreign.service,
- tour_foreign.date_go,
- tour_foreign.date_back,
- tour_foreign.term,
- tour_foreign.useradmin_submit,
- tour_foreign.date_submit,
- GROUP_CONCAT( tour_foreign_residence.name_re
- ORDER BY tour_foreign_residence.name_re
- SEPARATOR "، "
- ) AS name_re_all
- FROM tour_foreign
- INNER JOIN tour_foreign_residence
- ON ( tour_foreign.id = tour_foreign_residence.relation )
- JOIN (SELECT @rownum := 0) r
- WHERE tour_foreign.name LIKE "%' . $find . '%" OR
- WHERE FIND_IN_SET("%' . $find . '%", name_re_all);
- GROUP BY tour_foreign.id'
- I get this error:
- A Database Error Occurred
- Error Number: 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 'WHERE FIND_IN_SET("%%", name_re_all); GROUP BY tour_foreign.id' at line 22
- SELECT @rownum := @rownum + 1 rownum, tour_foreign.id, tour_foreign.name, tour_foreign.airline, MIN(tour_foreign_residence.name_re) AS name_re, tour_foreign.service, tour_foreign.date_go, tour_foreign.date_back, tour_foreign.term, tour_foreign.useradmin_submit, tour_foreign.date_submit, GROUP_CONCAT( tour_foreign_residence.name_re ORDER BY tour_foreign_residence.name_re SEPARATOR "، " ) AS name_re_all FROM tour_foreign INNER JOIN tour_foreign_residence ON ( tour_foreign.id = tour_foreign_residence.relation ) JOIN (SELECT @rownum := 0) r WHERE tour_foreign.name LIKE "%%" OR WHERE FIND_IN_SET("%%", name_re_all); GROUP BY tour_foreign.id
- Filename: D:\xampp\htdocs\system\database\DB_driver.php
- Line Number: 330
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement