PHP expert |
|
was net lekker aan het scripten toen dit voor me neus kwam
Citaat: Fatal error: Cannot use object of type stdClass as array in D:ProgramsserverxampphtdocsCMSforumview.php on line 23
regel 23 is:
<div class="l"><?= $marr['rank'] ?><br /><br />Posts: <?= $marr['forum_posts'] ?></div>
<div class="l"><?= $marr['rank'] ?><br /><br />Posts: <?= $marr['forum_posts'] ?></div>
nu is het, haal ik deze regel weg, komt dezelfde error maar op regel 30
if($marr['level'] >= 3 || $marr['userid'] == $_SESSION['userid'])
if($marr['level'] >= 3 || $marr['userid'] == $_SESSION['userid'])
dus nu ga ik de schuld geven aan de desbetreffende query wat is deze:
$mselect = mysql_query("SELECT * FROM members, personal WHERE userid = perid && userid = '".$arr['author']."'") or die(mysql_error());
$marr = mysql_fetch_object($mselect);
$mselect = mysql_query("SELECT * FROM members, personal WHERE userid = perid && userid = '".$arr['author']."'") or die(mysql_error());
$arr['author'] is numeric en komt van deze query
$select = mysql_query("SELECT * FROM topics WHERE catid = '".$_GET['catid']."' && subid = '".$_GET['subid']."' && topicid = '".$_GET['topicid']."'");
$arr = mysql_fetch_array($select);
$select = mysql_query("SELECT * FROM topics WHERE catid = '".$_GET['catid']."' && subid = '".$_GET['subid']."' && topicid = '".$_GET['topicid']."'");
mede doordat ik de error nog nooit heb gehad snap ik er niets van, iemand enig idee
|