andylord Posted April 1, 2010 Share Posted April 1, 2010 <? $Name = "Initiate Touch of Fire"; $query = SELECT * FROM Runesred WHERE Name='$Name' or die ('Error Selecting'); $result = mysql_query($query, $connection)or die ('Error Results');; $Name2 = mysql_result($result,"Name"); $Image = mysql_result($result,"Image"); $Class = mysql_result($result,"Class"); $Level = mysql_result($result,"Level"); $Damage = mysql_result($result,"Damage"); $Effect = mysql_result($result,"Effect"); $DroppedBy = mysql_result($result,"DroppedBy"); $Description = mysql_result($result,"Description"); $Mana = mysql_result($result,"Mana"); echo "<tr><td>$Name2</td><td></td></tr><tr><td>$Image</td><td> </td></tr><tr><td>$Class</td><td> </td></tr><tr><td>$Level</td><td> </td></tr><tr><td> </td><td>$Damage</td></tr><tr><td> </td><td>$Effect</td></tr><tr><td> </td><td>$DroppedBy</td></tr><tr> <td> </td><td>$Description</td></tr><tr><td> </td><td>$Mana</td></tr></table>"; ?> Looking for a while cant find it maybe another couple eyes could ? Before its just all the connection information (works tested) Link to comment https://forums.phpfreaks.com/topic/197268-whats-wrong-with-this/ Share on other sites More sharing options...
jonsjava Posted April 1, 2010 Share Posted April 1, 2010 forgot to put your query in quotes. Link to comment https://forums.phpfreaks.com/topic/197268-whats-wrong-with-this/#findComment-1035413 Share on other sites More sharing options...
andylord Posted April 1, 2010 Author Share Posted April 1, 2010 forgot to put your query in quotes. Lol i feel like a idiot now, cheers for the help Link to comment https://forums.phpfreaks.com/topic/197268-whats-wrong-with-this/#findComment-1035417 Share on other sites More sharing options...
jonsjava Posted April 1, 2010 Share Posted April 1, 2010 Oh, and I decided to clean the code up a bit. <? $Name = "Initiate Touch of Fire"; $query = "SELECT * FROM `Runesred` WHERE `Name`='$Name';" or die('Error Selecting\n<br />'.mysql_error()); $result = mysql_query($query, $connection)or die("Error Results: \n<br />".mysql_error()); while ($res = mysql_fetch_assoc($result)){ $Name2 = $res['Name']; $Image = $res['Image']; $Class = $res['Class']; $Level = $res['Level']; $Damage = $res['Damage']; $Effect = $res['Effect']; $DroppedBy = $res['DropedBy']; $Description = $res['Description']; $Mana = $res['Mana']; echo "<tr><td>$Name2</td><td></td></tr><tr><td>$Image</td><td> </td></tr><tr><td>$Class</td><td> </td></tr><tr><td>$Level</td><td> </td></tr><tr><td> </td><td>$Damage</td></tr><tr><td> </td><td>$Effect</td></tr><tr><td> </td><td>$DroppedBy</td></tr><tr> <td> </td><td>$Description</td></tr><tr><td> </td><td>$Mana</td></tr></table>"; } ?> Link to comment https://forums.phpfreaks.com/topic/197268-whats-wrong-with-this/#findComment-1035418 Share on other sites More sharing options...
andylord Posted April 1, 2010 Author Share Posted April 1, 2010 Ty so much showed me a few things there Link to comment https://forums.phpfreaks.com/topic/197268-whats-wrong-with-this/#findComment-1035425 Share on other sites More sharing options...
jonsjava Posted April 1, 2010 Share Posted April 1, 2010 ....and made a goof up as well... Link to comment https://forums.phpfreaks.com/topic/197268-whats-wrong-with-this/#findComment-1035428 Share on other sites More sharing options...
andylord Posted April 1, 2010 Author Share Posted April 1, 2010 ....and made a goof up as well... Lol no worries i got it working ty again Link to comment https://forums.phpfreaks.com/topic/197268-whats-wrong-with-this/#findComment-1035432 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.