ziedinjsh Posted November 12, 2010 Report Share Posted November 12, 2010 ir sadaļa report kur ir 3 titpi. ar select izvēlas vienu no viņiem aizpilda pārējo informāciju un ievada datu bāzē.. kā lai es izvadu katru tipu atsevišķi meiģināju šādi: $r = (isset($_GET['r'])) ? $_GET['r'] : ''; echo "<a href='index.php?id=report&r=payment'>Payment</a> | "; echo "<a href='index.php?id=report&r=bug'>Bug</a> | "; echo "<a href='index.php?id=report&r=advice'>Advice</a>"; if($r=='payment'){ $query = "SELECT * FROM d7 WHERE type='payment'"; $result = mysql_query($query); while($data = mysql_fetch_assoc($result)) { echo "".$data['date'].""; echo "".$data['title'].""; echo "".$data['message'].""; } } if($r=='bug'){ } if($r=='advice'){ } Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in D:\WEB\xampp\htdocs\sell\admin\report.php on line 14 ko es daru nepareizi? Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 12, 2010 Author Report Share Posted November 12, 2010 es atvainojos par topicu.. var dzēst ārā, jo savas muļības dēl ierakstīju nepareizo tabulu no kuras lasīt.. vajadzēja report nevis d7 Quote Link to comment Share on other sites More sharing options...
daGrevis Posted November 12, 2010 Report Share Posted November 12, 2010 echo "".$data['date'].""; *optimizējam* echo $data['date']; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.