Jump to content

LOAD_DATA_INFILE T_string error


cmor

Recommended Posts

When I run this snippet:

 

77
78  @ $db = new mysqli('localhost', 'username', 'password', 'mydatabase');
80  
81    if (mysqli_connect_errno()) 
82    {
83       echo 'Error: Could not connect to database.  Please try again later.';
84       exit;
85    }
86
87    LOAD DATA INFILE 'sqlsnow.txt' INTO TABLE weather;
87    $db->close();

 

I get:

 

Parse error: syntax error, unexpected T_STRING in /home/cmor/public_html/sqlfile.php on line 87

 

Could anyone point me in the right direction?

 

Thanks,

-Chris

Link to comment
Share on other sites

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.