EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::General Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=586)
-   -   something to get working (https://www.eqemulator.org/forums/showthread.php?t=29260)

bergalas 08-27-2009 01:13 PM

i do believe its the empy fields (||) in the items.txt file

cavedude 08-27-2009 01:17 PM

The only thing I can think of, do you have DBD installed? If not, there is a tutorial somewhere around here that tells you how to install it.

bergalas 08-27-2009 01:22 PM

new error lol

DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use near
'range,damage,color,itemtype,material,UNK060,elite material,sellrate,combateffect
s' at line 1 at load_13thfloor_items.pl line 72, <STDIN> line 3318.

bergalas 08-27-2009 01:27 PM

could range itself be a problem? as in a protected word in mysql?

bergalas 08-27-2009 01:31 PM

yep that IS the problem its a reserved word!

The following are new reserved words in MySQL 5.1:
ACCESSIBLE LINEAR MASTER_SSL_VERIFY_SERVER_CERT
RANGE READ_ONLY READ_WRITE

MySQL allows some keywords to be used as unquoted identifiers because many people previously used them. Examples are those in the following list:

bergalas 08-27-2009 01:37 PM

guess that means i need to downgrade mysql on my server

bergalas 08-27-2009 02:00 PM

UPDATE tested on my live webserver with mysql 5.0.51 ll required modules installed

DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at load_13thfloor_items.pl line 72, <STDIN> line 721.

I would like to note that I checked the svn this file hasnt been updated since 2008 sept.

bergalas 08-27-2009 02:12 PM

could we add something to this
Quote:

while(<STDIN>) {
chomp();
s/'/\\'/g;
@f=split("(?<!\\\\)\\|", $_);
$insert2=join("','",@f);
$#f--;
grep(s/\\\|/\\\\\|/g,@f);
grep(s/"/\\\\"/g,@f);
$statement=sprintf("%s%s','13THFLOOR',now()",$inse rt,$insert2,join('|',@f));
$dbh->do($statement);
printf("Processing: %d %s \r",$f[4],$f[1]);
++$count;
}
to replace || With |NULL|? Im not that good with perl

AndMetal 08-28-2009 01:24 AM

Quote:

Originally Posted by bergalas (Post 177448)
could we add something to this


to replace || With |NULL|? Im not that good with perl

I believe this will do the trick:

Code:

while(<STDIN>) {
chomp();
s/'/\\'/g;
s/||/|NULL|/g;
@f=split("(?<!\\\\)\\|", $_);
$insert2=join("','",@f);
$#f--;
grep(s/\\\|/\\\\\|/g,@f);
grep(s/"/\\\\"/g,@f);
$statement=sprintf("%s%s','13THFLOOR',now()",$inse rt,$insert2,join('|',@f));
$dbh->do($statement);
printf("Processing: %d %s \r",$f[4],$f[1]);
++$count;
}


bergalas 08-28-2009 03:32 AM

hmmm that didnt work either ugh i give up lol

Andrew80k 08-28-2009 11:19 AM

Nahh. That won't work. You'll need to escape the '|' with \ so:

s/\|\|/\|NULL\|/g;

the '|' is a special character in perl used as 'or' in regular expressions.

nosfentora 08-28-2009 02:05 PM

i'm not sure this will help, but if you quote range like this

`range`

mysql will accept it as a valid field identifier.

strictly speaking any field should be 'quoted' with the ` `, and values with ' '.


All times are GMT -4. The time now is 08:55 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.