Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help with .sql insert statement

Status
Not open for further replies.

BJZeak

Programmer
May 3, 2008
230
CA
Have a SQL file that is supposed to load configuration data into a database with the following type of statement
Code:
Insert Into SomeTable(ID,SomeNameField,SomeMediumBlobField) Values('0','SomeName', $FILE{/path/somefile.txt});

I gather the intent is to upload contents of somefile.txt into SomeMediumBlobField

I have tried XAMPP, MAMP, and ubuntu 20.04 with their latest MySQL installs and all fail to recognize this Insert command

They complain about $, and {} not being expected

w3shools doesn't appear to show any syntax for $FILE and some google hits don't show $FILE just {}

I removed the $FILE but still complains about {}

is this syntax incorrect or from a past version of mysql or not intended for mysql or ???

Thx in advance

 
Is it fair to guess that this statement was intended to run in some form of separate scripting language (like PHP)?

It is best to troubleshoot SQL statements directly in MySQL so that you can better observe any errors or warnings.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top