When in MySQL in a terminal, if I enter the command "source scriptfile.sql", 
MySQL correctly executes the source file.

However, if using PHP, I execute the following commands in a PHP file:

<?php
        // data base is connected...

$query = "source scriptfile.sql";
$result = mysql_query($query);

I get a MySQL "Query Error - You have an error in your SQL syntax near 
'source scriptfile.sql' at line 1".

I have tried numerous combinations of parentheses, single quotes and relative 
and absolute file paths.

Can someone please tell me what I am doing wrong?

Stephen Wardlaw
Yale labs


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to