Welcome Guest, Not a member yet? Register   Sign In
Not able to run a query
#4

[eluser]pickupman[/eluser]
At first glance, everything looked correct, and them I happened to remember you have trim the trailing ; at the end. explode() will create a empty array at the end of $contents. You can use this:
Code:
$contents = explode(';', rtrim($inserts,';'));

Explode on your string data will create an array like
[0] => Query 1
[1] => Query 2
[2] => NULL


That is why you are getting an empty query.


Messages In This Thread
Not able to run a query - by El Forum - 06-27-2010, 02:51 PM
Not able to run a query - by El Forum - 06-27-2010, 03:17 PM
Not able to run a query - by El Forum - 06-27-2010, 10:50 PM
Not able to run a query - by El Forum - 06-28-2010, 08:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB