Thank you funhacker
only problem with cq_ad_log is that it got only 3 rows
cq_ad_log.name
cq_ad_log.message
cq_ad_log_date (no timestamp , normal date )
and name is indeed the primary key (bad coded)
i am not sure , but it should be possible that date is the unic key value (every min limit ?)
if date is the unic key then its a realy big problem as there is no way to find it back on date (as that is not a matched key betwean tables)
so i get something as those value's below
PHP Code:
$sesiion[id] = account.id after login (get stored as a sesion)
account.id = primary
cq_user.id = primary
cq_user.account_id = primary id from account.id
cq_user.name = primary for cq_ad_log.name
cq_ad_log.name = primary
because of that bad code do i need to get the name that match the id , as everything is working over a id in the other tables
the array is not realy possible to , as i cap the messages at 5 rows , but it need to match the names and it is not a unic value in cq_ad_log but a unic value in cq_users
so basicly if you got 5 differend characters then it need to loop until it got all 5 differend characters and show the top 5 from all 5 characters (cq_users.account_id )
if character 1 got 5 shouts and character 2 got 3 shouts , then it should show only the 5 latest shouts of both characters
2 latest messages is from char1 , when 3 latest messages is from char2 = 5 shouts from 2 differend chars showing under each other sorted on date
in meantime i fixed it with following code
PHP Code:
while ($charlist = mysql_fetch_assoc($chardata))
{
echo "<option value ='".$charlist['id']."'>".$charlist[name]."</option>";
}
?>
</select>
</table>
<br>
<input class=Butt type=submit value="See Character Stats" name="search">
</FORM>
and then based on id it get the name and stuff
but i still wonder why the below code works perfect in a loop when for the characters it doesnt :S
PHP Code:
while ($petinfo = mysql_fetch_assoc($petdata))
{
$petnames = mysql_query("SELECT * FROM cq_table WHERE (`id` LIKE '".$petinfo['table']."' )");
$petname = mysql_fetch_assoc($petnames);
echo ("<td>".$petname['table']."</td>");
}
it exact does what it need to do , it select the id from table X and then keeps looping and showing all names that match the eudemons primary key
and then it just shows the pets there name and it works perfect (its a 2 table hop , edited above code to provide example )
ayway , thank you for your solution and i am sure i can use it for other purposes now i got a idea how to make a loop on a differend way then using
While
ps: it is still hard to make a control panel :P
Thank you
Greetings From PowerChaos