ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:qstr

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
v5:reference:connection:qstr [2018/07/16 19:38] – start functions lowercase peterddv5:reference:connection:qstr [2021/01/25 02:59] (current) mnewnham
Line 6: Line 6:
 == Syntax == == Syntax ==
   string qStr(   string qStr(
-         string $unquoted, +         string $unquotedText
-         optional bool $dontFixQuotes=false+
          )          )
 </WRAP> </WRAP>
Line 14: Line 13:
  
   - Wrapped in single quotes.The value can then be used, for example in an SQL statement.   - Wrapped in single quotes.The value can then be used, for example in an SQL statement.
-  - Have quotes inside the string escaped in a way that is appropriate for the database. This is done wherever possible using PHP driver functions e.g. [[http://php.net/manual/en/mysqli.real-escape-string.php|MySQL real_escape_string]]. The second parameter, ''$dontFixQuotes'' stops any internal quoting happening, This parameter was mostly used in older versions of PHP when the now removed ''magic_quotes'' parameter was enabled, and the 2 methods were in conflict+  - Have quotes inside the string escaped in a way that is appropriate for the database. This is done wherever possible using PHP driver functions e.g. [[http://php.net/manual/en/mysqli.real-escape-string.php|MySQL real_escape_string]].
  
 ------------------------------ ------------------------------
v5/reference/connection/qstr.1531762727.txt.gz · Last modified: 2018/07/16 19:38 by peterdd