Forum Moderators: coopster
If I list the values one after another in one line, as in value1,value2,value3 etc, everything works fine but I would like to be able to simply list the values one under the other, as in -
value1,
value2,
value3
etc.
When I try that, it inserts a hidden return line end code in the data. This shows up in the db, totally messing up the plan. How can I screen out the line end/return code from the query? Here is the query code -
$query = 'INSERT INTO '
.$settings['categories_table']
.'(`name`,`parent`) VALUES ("'
.$pieces[$key]
.'","'
.$_GET['bulk_upload_id']
.'")'
;
the url for the first example looks like this
name=istexample%2Cistexample2%2Cistexample3&bulk_upload_id=111
the url for the second example looks like this
?name=atest1%2C%0D%0Aatest2%2C%0D%0Aatest3&bulk_upload_id=111
but the endline code "%0D%0" isn't being shown in the echo of the query statement when it runs?
here is the echo -
INSERT INTO categories(`name`,`parent`) VALUES ("test2","111")
Thanks