Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-28-2015, 02:49 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,604
Default

I apologize:
Code:
use DBI;
use DBD::mysql;
sub List {
    my $idfile = shift;
    chomp $idfile;
    my $user = "USERNAME";
    my $pass = "PASSWORD";
    my $db = "DATABASE";
    my $dbh = DBI->connect("dbi:mysql:$db:localhost:3306", $user, $pass);
    $sth = $dbh->prepare("SELECT DISTINCT icon FROM `items` WHERE `idfile` = '$idfile' ORDER BY `icon` ASC");
    $sth->execute();
    my @a;
    if ($sth->rows() > 0) {
        while (my $icon = $sth->fetchrow()) {
            push @a, $icon;
        }
    }
    $sth->finish();
    $dbh->disconnect();
    return "All of the following item icons are used for idfile $idfile: " . join(", ", @a);
}
print "What idfile would you like to see the icons for?\n";
my $idfile = <STDIN>;
print List($idfile);
Example of use:
Reply With Quote
  #2  
Old 08-28-2015, 09:54 PM
Mortow's Avatar
Mortow
Hill Giant
 
Join Date: Apr 2013
Posts: 215
Default

Thanks, Kingly. That works great.
Reply With Quote
Reply

Thread Tools
Display Modes

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 -4. The time now is 12:46 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3