Jump to content

MYSQL coding error


otd

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.