yeahz Posted March 1, 2009 Report Share Posted March 1, 2009 (edited) if (!empty($_GET['atdod'])) { if ($_GET['atdod'] == $_GET['nem']) { echo "Izvēlies atšķirīgus parametrus, ko mainīt."; footer(); exit; } $yo = mysql_query("SELECT * FROM tirgus_maina WHERE maina=$_GET[atdod] AND pret=$_GET[nem]"); echo "<table width='100%' border='1' cellspacing='0' cellpadding='0'>"; echo "<td>Lietotājs</td><td>Maina, daudzums</td><td>Pret, daudzums</td><td>Pievienošanas laiks</td>"; while ($r = mysql_fetch_array($yo)) { $he = mysql_query("SELECT username,id FROM users WHERE id=$r[user_id]"); $user = mysql_fetch_array($he); echo "<td>$user[username]</td><td>$r[maina]<br />$r[maina_daudzums]</td><td>$r[pret]<br />$r[pret_daudzums]</td><td>" . date("Y",$r['laiks']) . "</td>"; } echo "</table>"; } Kur ir kļūda? Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ... on line 22 22 līnija ir while ($r = mysql_fetch_array($yo)) { Edited March 1, 2009 by yeahz Quote Link to comment Share on other sites More sharing options...
codez Posted March 1, 2009 Report Share Posted March 1, 2009 $_GET[atdod]=>$_GET['atdod'] Quote Link to comment Share on other sites More sharing options...
yeahz Posted March 1, 2009 Author Report Share Posted March 1, 2009 (edited) Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in ... on line 19 Labi, pats izlaboju. Edited March 1, 2009 by yeahz 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.