ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:adodb_assoc_case

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
v5:reference:adodb_assoc_case [2022/06/08 16:10]
dregad [ADODB_ASSOC_CASE] fix incorrect indication of when constant must be declared
v5:reference:adodb_assoc_case [2022/06/08 16:14] (current)
dregad [Usage] fix code samples to reflect correct initialization of ADODB_ASSOC_CASE
Line 30: Line 30:
 ===== Usage ===== ===== Usage =====
 <code php> <code php>
-define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_LOWER); 
 require "adodb.inc.php"; require "adodb.inc.php";
 +define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_LOWER);
 $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
  
-// $db Connection assumed+$db = ADONewConnection('mysql'); 
 +$db->connect($host, $user, $password, $database);
  
 print_r($db->getAll("SELECT accountNo, accountName FROM table")); print_r($db->getAll("SELECT accountNo, accountName FROM table"));
Line 50: Line 51:
  
 or: or:
 +
 <code php> <code php>
-define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_UPPER); 
 require "adodb.inc.php"; require "adodb.inc.php";
 +define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_UPPER);
 $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
  
-// $db Connection assumed+$db = ADONewConnection('mysql'); 
 +$db->connect($host, $user, $password, $database);
  
 print_r($db->getAll("SELECT accountNo, accountName FROM table")); print_r($db->getAll("SELECT accountNo, accountName FROM table"));
Line 73: Line 76:
  
 <code php> <code php>
-define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_NATIVE); 
 require "adodb.inc.php"; require "adodb.inc.php";
 +define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_NATIVE);
 $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
  
-// $db Connection assumed+$db = ADONewConnection('mysql'); 
 +$db->connect($host, $user, $password, $database);
  
 print_r($db->getAll("SELECT accountNo, accountName FROM table")); print_r($db->getAll("SELECT accountNo, accountName FROM table"));
v5/reference/adodb_assoc_case.txt · Last modified: 2022/06/08 16:14 by dregad