ok guys , Thank you all for helping me so far but i got a other problem that i cant get fixed :S
i try to show the legion name of every member on my info page , but i cant get it to work becouse it says all the time that i got a error in the script :S
let me explain what i try to create ^^ that always helps
first i need to get a conection of 2 differend tables
so i use the Toplegion.php to start whit becouse then i got the legion table
then i need to get $row[id] and [$row[synt_id] (if they match) to the $row[NAME] as prefix $legionname
i tryed differend things out but becouse i dont know php that good so i need help :S
here is a previeuw of the code i got working so far whit 1 error in it (so it doesnt work :S )
PHP Code:
$legions = mysql_query("SELECT NAME,id,leader_name,money,amount FROM cq_syndicate ORDER by money desc limit 5"); //custom added
$legio = mysql_query("SELECT syn_id FROM cq_synattr ORDER by syn_id desc limit 5" ); //custom added
$rank = mysql_query("SELECT NAME,level,profession,emoney,money_saved FROM cq_user ORDER by emoney desc limit 100");
//$row = mysql_fetch_array($rank);
$i=1;
while($row = mysql_fetch_array($rank)){
while($row1 = mysql_fetch_array($legio)); //custom added
while($row2 = mysql_fetch_array($legions)); // custom added
$legion = ($row2[id] == $row1[syn_id] = $row2[NAME]); //custom added
{
if($row['profession']==20)
{
$profession='warrior';
}
else if($row['profession']==30)
{
$profession='Paladin';
}
else{$profession='mage';
do some1 know how to fix the problem , the problem is that it doesnt get the names of the legion from the matching numbers (so far i know) and i dont know what command i need to use for it to make it work :s
might help if you explained in your code what your trying to do, along with a highlight of what line 55 is since there isnt any more then around 20lines there
Code:
SELECT syn_id FROM cq_synattr ORDER by syn_id desc limit 5
you didnt put a where clause in there I honestly dont know what your trying to do with this bit of code but if say you want to display the leader name of the top 5 you could just use the field in cq_syndicate or
Code:
SELECT syn_id FROM cq_synattr using cq_synattr inner join cq_syndicate where cq_synattr.syn_id = cq_syndicate.id and cq_synattr.player_id = cq_syndicate.leader_id and cq_synattr.rank = 1000 ORDER by syn_id desc limit 5
I cant say for sure all the fields are right or even the syntax tbh I dont use select at all when doing sql queries, I suggest though you say exactly what each query is spose to do and explain what your trying to do what is messing up etc
this is the shortest way and probaly the most clean way of explaining :s what i try to do
and to explain it a little more of the goal i try to do
i try to make a huge info script page where you can see every rank on in 1 single page
the code work this far that it shows no errors anymore , exept that it doesnt check the data to each other :S
moneybag.php (original , exept where stand something of edit , thats my code)
PHP Code:
<?php
$legions = mysql_query("SELECT NAME,id,leader_name,money,amount FROM cq_syndicate ORDER by id desc limit 10"); //edit
$guilds = mysql_query("SELECT syn_id FROM cq_synattr ORDER by syn_id limit 10"); //edit
$rank = mysql_query("SELECT NAME,level,profession,emoney,money_saved FROM cq_user ORDER by emoney desc limit 10");
//$row = mysql_fetch_array($rank);
$i=1;
while($row = mysql_fetch_array($rank)){ // if i dete this { then it doesnt show anything anymore
while($row1 = mysql_fetch_array($guilds)); //edit this was line 55 but was wrong table , so its fixed
while($row2 = mysql_fetch_array($legions)); //edit
//$legion = ($row2['id'] == $row1['syn_id'] = $row2['NAME']); // my edit
$legion =($row2['id'] != $row1['syn_id']) ? $row2['NAME'] : 'no legion'; //last solution from some1 els
the last solution works but not like it need to be , it only shows 'no Legion' instead of the legion name
Greets From The Crasher
@funhacker , i tryed out your code , but it give the same emty solution (it doesnt show anything :S )
ok hope this helps it will select the legions and peoples names within that legion dependant by their gold, it will show you Deputys -> leaders only and is limited to 100 entries
Code:
SELECT cq_syndicate.NAME,cq_syndicate.money,cq_user.name FROM cq_syndicate,cq_synattr,cq_user WHERE cq_syndicate.id = cq_synattr.syn_id AND cq_synattr.rank >= 900 AND cq_synattr.id = cq_user.id ORDER BY cq_syndicate.money DESC LIMIT 100
i gave up this script becouse it doesnt seems to work at all :S
its to difficult for me to figure the problem out , i got about 100 differend solutions and not even 1 works like it need to work :S
if some1 can bring out the script that show the legion members (name of player and legion of player and rank in legion ) on the top 10 page then i would be happy to have that script
mine should show Legion Name PLayer Name and Total Gold in Legion, to show ranks would be slightly more complex, you could make another table named legion_ranks, have id = rank number and then name = the name of that rank, example 1000 - Leader 990 - Leader's Spouse, etc
then you would just have it also select that table matching the names with the rank number<->id from legion_ranks
Well I dont think you fully understand or tried my query.
Code:
SELECT
cq_syndicate.NAME,cq_syndicate.money,cq_user.name
FROM
cq_syndicate,cq_synattr,cq_user
WHERE
cq_syndicate.id = cq_synattr.syn_id
AND
cq_synattr.rank >= 900
AND
cq_synattr.id = cq_user.id
ORDER BY
cq_syndicate.money
DESC LIMIT 100
it now looks strange :S
i know to less from php and mysql to find the error
the strange thing is that it works (so there isnt a error) but it doesnt show everything that is needed
it show now
rank 1 ........ mage
rank 100 ........ mage
and all the other are emty spaces :s
i still want to thank you for helping me and to be honnest , i dont get it why it doesnt works :S , it doesnt give errors so it loads from the db (otherwhise is it a mysql fetch error if i iam right :S )
still ,Thanky you for helping and Greets From The Crasher
Glad I could help I am not entirely sure on how to put that out there, best guess would be to include another colum but dont display it, cq_user.syndicate_id say
[Request]pvp script 08/17/2010 - Dekaron Private Server - 1 Replies hi can some1 know script with who i can reset all char pvp point
[Request]//[Help]Legion 05/14/2010 - EO PServer Hosting - 0 Replies Hey guys, quick question and help. me and my staff have been trying to fix a problem on moonlight. for some reason the legion just wont stay working. after creation and relogin they work fine. after maint or server shutdown they seem to be saved but they don't work. As in they all disappear. The legions stay in the table the table is not corrupt we have mysql version 4.0 exactly and the logs have no errors related to syndicate table so we are up sh$# creek without a paddle. help would be...
Legion sucht Member / Member sucht Legion 05/13/2009 - Aion - 3 Replies Damit hier in nächster Zeit nicht alles vollgespammt wird mit Legionen könnt ihr hier Member bzw. eine Legion suchen.
Ich fang dann mal an:
http://www2.pic-upload.de/13.05.09/2vxfnj.png
http://www2.pic-upload.de/13.05.09/s3zqz1.png
http://www2.pic-upload.de/13.05.09/c7tay.png
Script Request 01/22/2009 - Lineage 2 - 1 Replies could somone plz make a script to return to fightin spot in forsaken plains kinda this post http://www.elitepvpers.com/forum/lin2-exploits-hack s-bots-tools-macros/159515-l2walker-script-solo-re buff-restock-return-script.html
where gets rebuffs, buy soe and healin pot
plz
[REQUEST] Can i Request A Acc/Char PHP Script 09/27/2008 - CO2 Private Server - 6 Replies hello i was wondering if anyone have made a acc/char creation page in one yet? is so can anyone release itplease?