webdevdea Posted November 8, 2013 Share Posted November 8, 2013 Ok as you all know im still learning after hours of struggling over the sql code, I cannot get it to pull up in php. I have looked over books and sites. I cannot figure out what is wrong with the code. I am getting a 500 error Here is the code if you could give it a once over and see if anything sticks out to you professionals that would be greatly appreciated. $result = mysql_query("SELECT ( d.theCost + r.theCost + n.theCost ) AS TheBIll FROM doctor AS d, account AS a, room AS r, nurse AS n WHERE d.doctorID = a.doctorID AND r.roomID = a.roomID AND n.nurseID = a.nurseID"); echo "<table border='1'> <tr> <th>User Name</th> </tr>"; while($row = mysql_fetch_array($result)){ echo "<tr>"; echo "<td>" . $row['TheBill'] "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> Link to comment https://forums.phpfreaks.com/topic/283725-trouble-getting-results-from-query/ Share on other sites More sharing options...
webdevdea Posted November 8, 2013 Author Share Posted November 8, 2013 Sorry I have figured this out.. :-) thanks for looking.. stay tuned, i know i will need some help on this big project. Link to comment https://forums.phpfreaks.com/topic/283725-trouble-getting-results-from-query/#findComment-1457542 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.