|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
birdman313
Tactical Stability Union Salt the Earth
0
|
Posted - 2016.07.12 03:59:27 -
[1] - Quote
ok it works to a point it will insert rows but i get a error
Quote:Error : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 2
code here
it will add the rows but it cutes off 181 out of 256181 |
birdman313
Tactical Stability Union Salt the Earth
0
|
Posted - 2016.07.12 04:49:01 -
[2] - Quote
Mr Mac wrote:Line 51: 'Volume Entered' The column name has whitespace? not the issue 256000 row add just fine |
birdman313
Tactical Stability Union Salt the Earth
0
|
Posted - 2016.07.12 06:13:17 -
[3] - Quote
Salgare wrote:birdman313 wrote:ok it works to a point it will insert rows but i get a error Quote:Error : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 2 code hereit will add the rows but it cutes off 181 out of 256181 1024*1024*1024*2/256181 = 8382 ... I wonder if that's about the size of a row? i.e. you ran out of memory per line four of your code?
Php will give a error if you run out of memort and if i change the batch size to 100 it will do up to 256100 and drop 81 |
birdman313
Tactical Stability Union Salt the Earth
0
|
Posted - 2016.07.12 14:41:23 -
[4] - Quote
Steve Ronuken wrote:I _highly_ recommend you move to using PDO for your imports. I suspect the reason you have a failure is because of something having a quote in it. Probably station, or type (I don't know where your data is coming from. But if it had a single quote in it, then your code will break on that line. While you can do prepared statements with mysqli ( http://www.w3schools.com/php/php_mysql_prepared_statements.asp ), PDO is generally preferable, as the syntax remains the same, regardless of which database you're using (the sql will change. but the php side doesn't) Anyhoo, use prepared statements, so you don't have to worry about quoting stuff. It's the sensible way to do things.
that data is coming form the marked dump API for jita |
birdman313
Tactical Stability Union Salt the Earth
0
|
Posted - 2016.07.12 20:21:18 -
[5] - Quote
David Davaham wrote:Steve Ronuken wrote:I _highly_ recommend you move to using PDO for your imports. I suspect the reason you have a failure is because of something having a quote in it. Probably station, or type (I don't know where your data is coming from. But if it had a single quote in it, then your code will break on that line. While you can do prepared statements with mysqli ( http://www.w3schools.com/php/php_mysql_prepared_statements.asp ), PDO is generally preferable, as the syntax remains the same, regardless of which database you're using (the sql will change. but the php side doesn't) Anyhoo, use prepared statements, so you don't have to worry about quoting stuff. It's the sensible way to do things. I agree. Move to PDO. Some additional troubleshooting. Right before the Die, output the array of information that is being inputted and causing the error. This will allow you to see what exactly is causing it. Can you post a PasteBin of the Data File? cant pasteBin to big but here it is form CCP Here is the last file with the data |
birdman313
Tactical Stability Union Salt the Earth
0
|
Posted - 2016.07.12 21:40:08 -
[6] - Quote
fix all issue by adding
Quote:$sql =rtrim($sql, ","); on line 63 |
|
|
|