Re: execute external sql script in php
| From: | fabrizio | Date: | Tue, 18 Jun 2002 11:44:50 +0000 |
| Subject: | Re: execute external sql script in php | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19857@lists.php.net to get a copy of this message | ||
Jeff,
source command in mysql shell is the same like
mysql -u user -p < /home/mysql/mysql_script.
if i'm in the mysql shell i do:
mysql> source /home/mysql/mysql_script;
...to execute the script. this look to work like a normal query,
but in my php script dont work!
what's wrong?
regards,
fabrizio
On Tuesday 18 June 2002 13:22, Jeffrey_N_Dyke@Keane.com wrote:
> is this from within the browser? if so, you'd need to open the file, read
> the contents and execute the script. I don't knwo what 'source' does. but
> i don't claim to know much either. i may not have heard of this.
>
> if you just want to do it from a command line then you use a < after your
> login and password args
>
> mysql -u user -p < /home/mysql/mysql_script
>
> Hope this helps
> Jeff
>
>
>
> fabrizio
> <fabrizio@sad. To: php-db@lists.php.net
> it> cc:
> Subject: [PHP-DB] execute
> external sql script in php 06/18/2002
> 06:19 AM
> Please respond
> to fabrizio
>
>
>
>
>
>
> Hello dear all,
>
> i try to execute an external sql-script to the mysql server
>
> $query ="source /home/mysql/mysql_script"
>
>
> ...but allways i get "Impossible to execute the query"
>
> any idea to do a stuff like this?
>
> thanks
>
> fabrizio
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php