FanaT Posted August 25, 2005 Author Report Share Posted August 25, 2005 (edited) ok Edited August 25, 2005 by FanaT Link to comment Share on other sites More sharing options...
bubu Posted August 25, 2005 Report Share Posted August 25, 2005 (edited) eh... saproti, ka šādi grūti izskaitīt rindiņas.. Izdzēs to ārā un aizej ieliec iekš http://paste.php.lv/ Edit: Tev tur pēc kārtas ir divas vienādas funkcijas function fetch_object($resource) { $result = mysql_fetch_object($resource); return $result; } //------------------------------------------------------------------------------------------// function fetch_object($resource) { $result = mysql_fetch_object($resource); return $result; } Edited August 25, 2005 by bubu Link to comment Share on other sites More sharing options...
Robis Posted August 25, 2005 Report Share Posted August 25, 2005 Visticamāk, ka kļūda ir tieši tai database.php failā. Link to comment Share on other sites More sharing options...
FanaT Posted August 25, 2005 Author Report Share Posted August 25, 2005 http://paste.php.lv/2368#143 - 143 rinda Link to comment Share on other sites More sharing options...
Robis Posted August 25, 2005 Report Share Posted August 25, 2005 http://paste.php.lv/2368#143 - 143 rinda 21486[/snapback] Un kas vainas tai rindai? Link to comment Share on other sites More sharing options...
FanaT Posted August 25, 2005 Author Report Share Posted August 25, 2005 Visticamāk, ka kļūda ir tieši tai database.php failā. 21485[/snapback] http://paste.php.lv/2369 - database.php Link to comment Share on other sites More sharing options...
FanaT Posted August 25, 2005 Author Report Share Posted August 25, 2005 Robis - nu man rada kljudu kad es ieeju uz saita :( ko tur pamainit vai izlabot? Link to comment Share on other sites More sharing options...
Robis Posted August 25, 2005 Report Share Posted August 25, 2005 Robis - nu man rada kljudu kad es ieeju uz saita :( ko tur pamainit vai izlabot? 21489[/snapback] Mēģini atkal un iekopē te kļūdu. Link to comment Share on other sites More sharing options...
Analgiins Posted August 25, 2005 Report Share Posted August 25, 2005 ou jee, XOOPS njemam priekshaa.. Tur jau nu gan nevajadzeetu buut probleemaam, ja pats neesi kaut ko sachakareejis. Gan jau ka nav konekta pie datubaazes. Kljuudu ta paraada tajaa rindinjaa, bet iespeejams ka iistaa kljuuda jau ir kaut kur ieprieksh. Taa ir, ka lien lapaas, kuraas nav paredzeets, mayby to lapu inkluudo kaada cita, kur ieprieksh ir db konekti un paareejaas shtelliites Link to comment Share on other sites More sharing options...
FanaT Posted August 25, 2005 Author Report Share Posted August 25, 2005 Robis - Fatal error: Cannot redeclare Database::fetch_object() in D:\WWW\Apache2\htdocs\class\database\mysql.php on line 143 Link to comment Share on other sites More sharing options...
FanaT Posted August 25, 2005 Author Report Share Posted August 25, 2005 ou jee, XOOPS njemam priekshaa.. Tur jau nu gan nevajadzeetu buut probleemaam, ja pats neesi kaut ko sachakareejis. Gan jau ka nav konekta pie datubaazes. Kljuudu ta paraada tajaa rindinjaa, bet iespeejams ka iistaa kljuuda jau ir kaut kur ieprieksh. Taa ir, ka lien lapaas, kuraas nav paredzeets, mayby to lapu inkluudo kaada cita, kur ieprieksh ir db konekti un paareejaas shtelliites 21491[/snapback] es jau vinja nemaz neliidu :( Link to comment Share on other sites More sharing options...
Analgiins Posted August 25, 2005 Report Share Posted August 25, 2005 (edited) nu tak bubu man liekas ka jau teica - divas reizes deklareeta funkcija fetch_object() Edit: kaa tu domaa, ko noziimee Cannot redeclare Edited August 25, 2005 by Analgiins Link to comment Share on other sites More sharing options...
Robis Posted August 25, 2005 Report Share Posted August 25, 2005 (edited) Robis - Fatal error: Cannot redeclare Database::fetch_object() in D:\WWW\Apache2\htdocs\class\database\mysql.php on line 143 Problēma ir citā failā - tajā kur ir tas Database::fetch_object(). Šādi izsaucot funkciju tu reizē izveido jaunu objektu Database, labāk izmanto esošo pointeri uz to objektu, piem: $db = new Database(); $db->connect("localhost", "root", "", 0, "datubaze"); // tālāk visas funkcijas veicam ar jau izveidoto pointeri $db $query_result = $db->query("SELECT * FROM `table` WHERE `id`='123';"); $row_object = $db->fetch_object($query_result); // ... utt. Edited August 25, 2005 by Robis Link to comment Share on other sites More sharing options...
FanaT Posted August 25, 2005 Author Report Share Posted August 25, 2005 /** * Description * * @param type $var description * @return type description */ function loadGroups($id, $item, $table, $field='groupid') { global $db; $this->table = $db->prefix($table); $this->field = $field; $this->item = $item; if ($result = $db->query("SELECT ".$this->field." FROM ".$this->table." WHERE ".$this->item."='$id'")) { list($groups) = $db->fetch_row($result); unset($this->groups[$this->groupname]); $this->addGroups($groups, 1); return(TRUE); } return(FALSE); } 6eit viss ir ok? Link to comment Share on other sites More sharing options...
Recommended Posts