You are here: Please help me with some SQL « PHP SQL « IT news, forums, messages
Please help me with some SQL

Posted by Ulle on 07/07/06 04:49

Hi there folks.. :)
I've got some troubles here, The man that can, dont give a S..., with others
problems.. I tried to ask for a solution but nothing helped..

Here is what he said i should do :

Simply put the SQL-Statement and take out all the filter-stuff. That should
do it.

And how do i do that..lol
I hope some of you guys or Girls can help me with this...
The code is :

function addUnCategorized($categories)
{
$weapons = array();
$res = SQL_query("select distinct weapon from selectbf_kills_weapon order
by weapon ASC");
while($cols = SQL_fetchArray($res))
{
array_push($weapons,$cols);
}

for($i = 0; $i<count($categories); $i++)
{
$members = $categories[$i]["members"];

$uncategorized = array();

for($j = 0; $j<count($weapons); $j++)
{
$found = false;
for($k = 0; $k<count($members) && $found==false; $k++)
{
if($weapons[$j]["weapon"]==$members[$k]["member"])
{
$found = true;
}
}
if($found == false)
{
array_push($uncategorized,array("weapon"=>$weapons[$j]["weapon"]));
}
}

$categories[$i]["uncategorized"] = $uncategorized;
}

return $categories;
}

Best Regards
Ulle

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация