note 90809 added to function.mysql-query

From: Date: Mon, 11 May 2009 13:21:51 +0000
Subject: note 90809 added to function.mysql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-154444@lists.php.net to get a copy of this message
MyData.php : <?php class MyData { private $data = array(); private $fields = array(); public function MyData () { } public function addDataToList($row, $fieldName, $data) { $this->data[$row][$fieldName] = $data; $this->addToDefs($fieldName); } public function getRowCount () { return(count($this->data)); } public function getFieldCount () { return(count($this->data[0])); } public function getRow ($row) { return($this->data[$row]); } public function getField ($row, $field) { return($this->data[$row][$field]); } private function addToDefs ($fieldName) { $this->fields[$fieldName] = ""; } public function getFields () { return($this->fields); } public function resultsDump () { $tempFields = array_keys($this->fields); for($nData=0; $nData<count($this->data); $nData++) { $CurrentRow = $nData + 1; print("Data Row $CurrentRow:<br/>"); for($nName=0; $nName<count($tempFields); $nName++) { $CurrentName = $tempFields[$nName]; $CurrentData = $this->data[$nData][$CurrentName]; print("$CurrentName : [$CurrentData]<br/>"); } print("<br/>"); } } } ?> ---- Server IP: 209.41.74.194 Probable Submitter: 170.252.64.1 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-query.php Edit -- https://master.php.net/note/edit/90809 Del: integrated -- https://master.php.net/note/delete/90809/integrated Del: useless -- https://master.php.net/note/delete/90809/useless Del: bad code -- https://master.php.net/note/delete/90809/bad+code Del: spam -- https://master.php.net/note/delete/90809/spam Del: non-english -- https://master.php.net/note/delete/90809/non-english Del: in docs -- https://master.php.net/note/delete/90809/in+docs Del: other reasons-- https://master.php.net/note/delete/90809 Reject -- https://master.php.net/note/reject/90809 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#154444) next »