|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics. Do not post support topics here. |

08-27-2009, 01:13 PM
|
Banned
|
|
Join Date: Aug 2009
Location: look behind you
Posts: 30
|
|
i do believe its the empy fields (||) in the items.txt file
|

08-27-2009, 01:17 PM
|
 |
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
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.
|

08-27-2009, 01:22 PM
|
Banned
|
|
Join Date: Aug 2009
Location: look behind you
Posts: 30
|
|
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.
|

08-27-2009, 01:27 PM
|
Banned
|
|
Join Date: Aug 2009
Location: look behind you
Posts: 30
|
|
could range itself be a problem? as in a protected word in mysql?
|

08-27-2009, 01:31 PM
|
Banned
|
|
Join Date: Aug 2009
Location: look behind you
Posts: 30
|
|
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:
|

08-27-2009, 01:37 PM
|
Banned
|
|
Join Date: Aug 2009
Location: look behind you
Posts: 30
|
|
guess that means i need to downgrade mysql on my server
|

08-27-2009, 02:00 PM
|
Banned
|
|
Join Date: Aug 2009
Location: look behind you
Posts: 30
|
|
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.
|

08-27-2009, 02:12 PM
|
Banned
|
|
Join Date: Aug 2009
Location: look behind you
Posts: 30
|
|
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
|

08-28-2009, 01:24 AM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Quote:
Originally Posted by bergalas
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;
}
|

08-28-2009, 03:32 AM
|
Banned
|
|
Join Date: Aug 2009
Location: look behind you
Posts: 30
|
|
hmmm that didnt work either ugh i give up lol
|

08-28-2009, 11:19 AM
|
Dragon
|
|
Join Date: Feb 2007
Posts: 659
|
|
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.
Last edited by Andrew80k; 08-28-2009 at 11:21 AM..
Reason: Forgot my semicolon
|

08-28-2009, 02:05 PM
|
Discordant
|
|
Join Date: Oct 2004
Location: In a house
Posts: 387
|
|
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 ' '.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 12:13 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |