Difference between revisions of "Database upgrade"

From OpenEMR Project Wiki
(Created page with "Upgrading ADODB to PDO. Remove all sqlFetchArray() calls. Example `$res2 = sqlStatement("select * from lang_languages where lang_description = ?",array($GLOBALS['language_defau...")
 
Line 4: Line 4:


Example
Example
`$res2 = sqlStatement("select * from lang_languages where lang_description = ?",array($GLOBALS['language_default']));
<code>
for ($iter = 0;$row = sqlFetchArray($res2);$iter++)
$res2 = sqlStatement("select * from lang_languages where lang_description = ?",array($GLOBALS['language_default']));
          $result2[$iter] = $row;`
for ($iter = 0;$row = sqlFetchArray($res2);$iter++)
 
$result2[$iter] = $row;`
</code>
Becomes
Becomes
`$result2 = sqlStatement("select * from lang_languages where lang_description = ?",array($GLOBALS['language_default']));`
<code>
$result2 = sqlStatement("select * from lang_languages where lang_description = ?",array($GLOBALS['language_default']));
</code>

Revision as of 05:38, 29 September 2016

Upgrading ADODB to PDO.

Remove all sqlFetchArray() calls.

Example

$res2 = sqlStatement("select * from lang_languages where lang_description = ?",array($GLOBALS['language_default']));
for ($iter = 0;$row = sqlFetchArray($res2);$iter++)
$result2[$iter] = $row;`

Becomes

$result2 = sqlStatement("select * from lang_languages where lang_description = ?",array($GLOBALS['language_default']));