mitchell
03-09-2008, 07:14 PM
Hi everyone i have a prob. know when you have a page with a SELECT query, to display all the pages results e.g
$info = sql_query (SELECT.......
echo "
$info[detail]
$info[name]
"
what should i do if i want to add another piece of user info between [detail] and [name] but it requires another query so it gets the data.
like this:
$result = mysql_query("SELECT * FROM alliance WHERE id='" . $user['alliance'] . "'");
$row = mysql_fetch_assoc($result);
echo "$row['alliance_name'] ;
it just doest work if i have more than one query in a script. i need advise.
please help me with my prob:confused:
$info = sql_query (SELECT.......
echo "
$info[detail]
$info[name]
"
what should i do if i want to add another piece of user info between [detail] and [name] but it requires another query so it gets the data.
like this:
$result = mysql_query("SELECT * FROM alliance WHERE id='" . $user['alliance'] . "'");
$row = mysql_fetch_assoc($result);
echo "$row['alliance_name'] ;
it just doest work if i have more than one query in a script. i need advise.
please help me with my prob:confused: