Guest User

Untitled

a guest
Jul 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. $sql = "SELECT * FROM
  2. `quotes`
  3. WHERE
  4. MATCH(quote) AGAINST(:against IN BOOLEAN MODE) AND
  5. quote REGEXP '[[:<:]]:regexp[[:>:]]'
  6. LIMIT 1";
  7. $exec = $result->execute([':against' => $word, ':regexp' => $word]);
  8.  
  9. $sql = "SELECT * FROM
  10. `quotes`
  11. WHERE
  12. MATCH(quote) AGAINST(:against IN BOOLEAN MODE) AND
  13. quote REGEXP '[[:<:]]" . PDODB::quote($word) . "[[:>:]]'
  14. LIMIT 1";
  15.  
  16. $exec = $result->execute([':against' => $word]);
  17.  
  18. '[[:<:]]'book'[[:>:]]'
Add Comment
Please, Sign In to add comment