Jump to content

Recommended Posts

Hi,

 

I have a query that I\'m attempting to load from a PHP page that is not working. However, the exact same query works just fine when I run it from the MySQL command line.

 

This is the query:

LOAD DATA LOCAL INFILE \'/home/ratdog/public_html/test.txt\' INTO TABLE `shows`

 

I\'ve run similar queries through PHP with no problem, and I\'m absolutely stumped on why this won\'t work when it works fine from the command line.

 

Thanks for any help,

 

Dave

Link to comment
https://forums.phpfreaks.com/topic/448-query-works-from-shell-but-not-php-page/
Share on other sites

By the way, I get the error:

 

ERROR: The used command is not allowed with this MySQL version

 

if I make it `shows` instead of \'shows\'

 

 

 

I get the error:

 

ERROR: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near \'\'shows\'\' at line 1

 

if I leave it as \'shows\'

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.