Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 18.12.2005, 09:53   #1
Domzelan
Архивный участник
 
Join Date: Apr 2005
Posts: 599
Default [Share] Item Search (PHP)

This script help you find items from users.

How it works? - just find (where item_type = 4640) where 4640 - ItemId. ItemId you can find in Itemdata.txt.

From Russia.
Domzelan is offline  
Old 18.12.2005, 13:01   #2
Dmytro
Архивный участник
 
Join Date: Nov 2005
Posts: 215
Default

Hm, i am take the query from ASP files:
[php:1:bb801b48bb]$result=mssql_query("SELECT TmpD.sumamount,user_data.char_name,user_data.gende r,user_data.account_name,user_data.lev,user_data.b uilder FROM (SELECT char_id, SUM(amount) AS sumamount FROM user_item WHERE item_type = $id GROUP BY char_id) TmpD INNER JOIN user_data ON TmpD.char_id = user_data.char_id WHERE account_id>0 ORDER BY TmpD.sumamount DESC");
[/php:1:bb801b48bb]
Where $id - Item type. Work fine, i see all who has that item (or items).

In your code some mistakes:
[php:1:bb801b48bb]for($x=0;$online_users[$x]=mssql_fetch_assoc($result);$x++){
$online_users[$x]['use_time_h']=round($online_users[$x]['use_time']/3600,1)."h";
};
[/php:1:bb801b48bb]
$online_users[$x]['use_time_h']=round($online_users[$x]['use_time']/3600,1)."h"; - it is not necessary
And you don't write this in query - "account_id>0", all deleted chars will are shown, if they have item.

Thx for share.
Dmytro is offline  
Old 18.12.2005, 14:37   #3
Metalmurphy
Архивный участник
 
Join Date: Feb 2005
Posts: 766
Default

whats wrong with query analizer? oO
Metalmurphy is offline  
Old 18.12.2005, 19:44   #4
Domzelan
Архивный участник
 
Join Date: Apr 2005
Posts: 599
Default

It was online status - i did item search
Domzelan is offline  
Old 20.12.2005, 04:20   #5
2Rain
Архивный участник
 
Join Date: Aug 2005
Posts: 194
Default

Domzelan:
<rus>Хороший скриптик для отлова читерюг!
А доделать можешь так, чтобы ИД итема не намертво вбит был в тексте скрипта, а через форму назначался переменной и по кнопочке искал по введённому в форму ИД?
Бывает часто нужно искать по самым разным итемам.</rus>

Good job, but can be better!
2Rain is offline  
Old 20.12.2005, 09:38   #6
Domzelan
Архивный участник
 
Join Date: Apr 2005
Posts: 599
Default

Yes - it easy, 5 minutes - and form is done i share ver0.1 lately...
Domzelan is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 15:11.