ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:activerecord:getattributenames

Differences

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

Link to this comparison view

Next revision
Previous revision
v5:activerecord:getattributenames [2015/12/05 02:02]
mnewnham created
v5:activerecord:getattributenames [2018/07/02 14:19]
peterdd prefer functions start lowercase (#430)
Line 10: Line 10:
 ===== Usage ===== ===== Usage =====
 <code php> <code php>
-$db->Execute("​CREATE TEMPORARY TABLE `persons` (+$db->execute("​CREATE TEMPORARY TABLE `persons` (
                 `id` int(10) unsigned NOT NULL auto_increment,​                 `id` int(10) unsigned NOT NULL auto_increment,​
                 `name_first` varchar(100) NOT NULL default '',​                 `name_first` varchar(100) NOT NULL default '',​
Line 22: Line 22:
 $person = new person(); $person = new person();
  
-echo "<​p>​Output of getAttributeNames:​ "; 
 var_dump($person->​getAttributeNames());​ var_dump($person->​getAttributeNames());​
  
Line 28: Line 27:
  * Outputs the following:  * Outputs the following:
  * array(4) {  * array(4) {
- ​* ​   [0]=> + ​* ​   [0]=> string(2) "​id"​ 
- ​* ​   ​string(2) "​id"​ + ​* ​   [1]=> string(9) "​name_first"​ 
- ​* ​   [1]=> + ​* ​   [2]=> string(8) "​name_last"​ 
- ​* ​   ​string(9) "​name_first"​ + ​* ​   [3]=> string(13) "​favorite_color"​
- ​* ​   [2]=> +
- ​* ​   ​string(8) "​name_last"​ +
- ​* ​   [3]=> +
- ​* ​   ​string(13) "​favorite_color"​+
  ​* ​ }  ​* ​ }
  */  */
 </​code>​ </​code>​
v5/activerecord/getattributenames.txt · Last modified: 2018/07/02 14:19 by peterdd