php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25884 to run a mysql script from php
Submitted: 2003-10-15 11:41 UTC Modified: 2003-10-15 19:06 UTC
From: mazsolt at yahoo dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.3 OS: win 2000 Server, IIS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mazsolt at yahoo dot com
New email:
PHP Version: OS:

 

 [2003-10-15 11:41 UTC] mazsolt at yahoo dot com
Description:
------------
hello
I launched this problem on several forums ( like phpbuilder), but I haven't got an answer for it.

I have a mysql script, which I can run from the mysql command prompt with: 
mysql> \. out.txt  // out.txt is the name of the script file located in c:\mysql\bin

The script run without problems, in fact it contains only 2 lines :
 use test
 select * from table1
Now, I would wish to run the script from a php program too, with the command:
mysql_query("\\. out.txt");

I received an error message, which indicated me a SYNTAX error in the appropiate line...

I tried to use the fullpath of the script:
mysql_query("\\. C:\\mysql\\bin\\out.txt"), but I got the same error message.

I think there is a BUG, because I couldn't discover any syntax error (I escaped all the backslashes).

I discovered, that you couldn't run any of the "short-hand" mysql-commands from php, like \h.

Could you send me answer, please? at the forums, even senior members weren't able to solve my problem.

Thanks in advance!



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-15 19:06 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Not a PHP bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 10:01:31 2024 UTC