0

Here is my query:

INSERT INTO GAME values (3, 'Termonator2',LOAD_FILE("C:\\Users\\Public\\Videos\\Sample Video\\test.wmv")); 

When I run this query, I get 'row inserted successfully' with no error but I can't see video link or any thing in video column Y - I don't understand that.

Whereas I can see '3andTermonator2in specified columns - perhaps *MySQL* doesn't support.wmv`?

If no, then which extensions could I use? (sorry in advance for may be bit stupid question I'm new to all this business of trying to store videos links in MySQL database, so thanks in advance :)

bgmCoder
  • 6,205
  • 8
  • 58
  • 105
  • 1
    [storing-images-in-db-yea-or-nay](http://stackoverflow.com/questions/3748) – juergen d Aug 05 '13 at 00:24
  • Exactly. Store **file paths** in the database, leave the actual data in the **file system**. That's what it's best for. – Thomas W Aug 05 '13 at 00:42
  • 1
    You've got to learn how to write good questions if you are going to post in this forum! You know, proper grammar, formatting, etc. I've cleaned it up this time. – bgmCoder Aug 05 '13 at 00:47
  • AS GBM says, write your questions properly. Then someone might be able to/ want to read them. **Same applies for your code.** Write clear & understandable, so you & other people can follow. – Thomas W Aug 05 '13 at 00:55
  • @BGM,@Thomas i will take care of this next time ,i posted here for the first time i think i got it now thank you very much – Maryam Khan Aug 05 '13 at 12:29

1 Answers1

0

its probably because of the quote " signs

try using this method instead

$address='LOAD_FILE("C:\Users\Public\Videos\Sample Video\test.wmv")';// assuming u are using php

INSERT INTO GAME values (3, 'Termonator2',$address);
Shiva
  • 6,677
  • 4
  • 36
  • 61
  • Basically i want to embed a *media player* on my web age n link it with *MySQL* i am currently working in _adobe flash media player_ is it a good choice? or i should go for something else please guide me a little bit so i can choose the better path thank you – Maryam Khan Aug 05 '13 at 12:21
  • Thanks a lot for your suggestion,but i am getting this ERROR after i pasted your suggested code – *ERROR SQL query*: `$address = 'LOAD_FILE("C:\Users\Public\Videos\SampleVideo\test.wmv")';` MySQL said: Documentation #1064 - 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 `'$address='LOAD_FILE("C:\Users\Public\Videos\Sample Video\test.wmv")''` at line 1 – Maryam Khan Aug 05 '13 at 12:25
  • @MaryamKhan there was probably one error in my code, I have edited it , so please try using this correct code.Hope it works for you – Shiva Aug 05 '13 at 17:27
  • No its still giving exactly the same error :( i cannot figure out what change you made in the CODE, anyways please guide me with *mySQL* database i should choose which stuff for developing my media player – Maryam Khan Aug 05 '13 at 19:57