otd Posted July 4, 2008 Share Posted July 4, 2008 Good Afternoon, im a bit of a newbie in mysql really and ive got a bit code that im struggling on and any help in this would be greatly appreciated. if i have the below in the code - <?php echo $ccAdminData[0]['adminId']; ?> it displays 9, what i want to do is <?php $result = mysql_query("SELECT * FROM invoice WHERE admin_id_invoice='$ccAdminData[0]['adminId']'"); while($row = mysql_fetch_array($result)) { echo $row['admin_name'] . " " . $row['total_sales']; echo "<br />"; }?> so it displays information relating to $ccAdminData[0]['adminId']; but obviously this doesnt work.. Im guessing im making a silly mistake. Any Ideas??? :-\ Link to comment https://forums.phpfreaks.com/topic/113228-mysql-coding-error/ Share on other sites More sharing options...
Stephen Posted July 5, 2008 Share Posted July 5, 2008 Dumb question, but do you even connect to the database? Link to comment https://forums.phpfreaks.com/topic/113228-mysql-coding-error/#findComment-582251 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.