I want to make a database restore function that will parse a dump made with Php My Admin and will do the queries.
I have already a mysql class that does the query, but it only knows to do a single query.
So i am looking of a way to split the file content into single queries.
I tried to play with preg_split ... but didn't managed to get...
Got the following simple query which works fine through phpmyadmin but when I add it to my php website no results are returned and no error/warning messages either. If I remove "SET @N=-1;" then it works fine.
<?php
$db_connect = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD, true);
mysql_select_db(DB_NAME, $db_connect);
$test_query = m...
This is my xml result return from facebook
<fql_result_set list="true" xmlns="http://api.facebook.com/1.0/">
<comment>
<object_id>340982187784
</fql_result_set>
<fql_result_set list="true" xmlns="http://api.facebook.com/1.0/">
<fql_result_set_elt list="true">
<fql_result_set_elt_elt key="object_id">340982187784811202...
I've got an sql query that contains a number of statements. It:
sets a user variable
calls a stored procedure
calls another stored procedure
selects some data
I know that the query is correct, because I've tested it in MySQL Workbench, under the same user. The query is this:
set @current_post = 535; /* 535 for testing, this will be ...