3 posts
· 3 views
· Last UP: 18/11/2012 01:24
AuroraGPT
Ho un problema con members/store.php in pratica quando ci vado, mi appare il seguente messaggio: CODICE Fatal error: Call to a member function query() on a non-object in /membri/theultimatepts/members/store.php on line 4 Uso Altervista(e gira benissimo u.u), ed ho provato a cambiare il valore della tabella "active". Ecco il codice: CODICE <? $includes[title]="Point Store"; $sqlDB=$Db1->query("SELECT * FROM store_items WHERE active='1' and qty>0"); if($Db1->num_rows() > 0) { while($item=$Db1->fetch_array($mysqlDB)) { $list.=" <tr class=\"tableHL3\"> <td height=5 colspan=2></td> </tr> <tr class=\"tableHL2\"> <td nowrap=\"nowrap\" width=\"100\"> <small> Quantity: $item[qty]<br /> ".iif($item[points]>0,"Point Cost:</b> $item[points]<br />")." ".iif($item[cash]>0,"Cash Cost:</b> $item[cash]<br />")." <a href=\"index.php?view=account&ac=buy_item&id=$item[id]&".$url_variables."\">Purchase Item</a> </small> </td> <td> <b>$item[title]</b><br /> ".nl2br($item[description])."<br /> </td> </tr> "; } } else { $list="<tr class=\"tableHL2\"><td><b>There are no items in the store right now. Please check back frequently!</b></td></tr>"; } $includes[content]=" Welcome to the point store. Here you can purcase items using your account balance and points! <table cellpadding=1 cellspacing=0 class=\"tableBD1\" width=\"100%\"> <tr> <td> <table width=\"100%\" cellpadding=0 cellspacing=0> $list <tr class=\"tableHL3\"> <td colspan=2 height=5></td> </tr> </table> </td> </tr> </table> "; ?> L'errore me lo da nella linea 4, cioè qui: $sqlDB=$Db1->query("SELECT * FROM store_items WHERE active='1' and qty>0"); Grazie
Up
18/11/12 01:24
0
Il campo 'active' con quale variabile è stato dichiarato?
Log in to reply to this topic.
Messaggio simile al precedente
Il testo sembra un duplicato o un tentativo di UP. Per far risalire la discussione usa il pulsante UP: mantiene il thread pi├╣ ordinato. Puoi comunque pubblicare il messaggio se lo desideri.
Select message
False or abusive reports are misconduct and may lead to account restrictions and other action by staff.