Loading

How to save file path exactly in MySQL db..

4 posts / 0 new
Last post
Offline
Joined: 06/09/2010
How to save file path exactly in MySQL db..

my problem is when i save a filepath in mySQL database the mysql interprets it as escape character..maybe i could manipulate the filename saved but dont know the file dialog workarounds..thanks...

Offline
Joined: 06/09/2010
here's the path..

C:\Documents and Settings\aa\Desktop\flash\sj.swf interpreted by mysql to C:Documents and SettingslemoDesktopflashsj.swf..thanks//...

Anonymous
re: How to save file path exactly in MySQL db..

you have to use 2 \\ for every \ in the path. Since MySQL is using C escape syntax in strings.

so your path to be saved into the database should be:

C:\\Documents and Settings\\aa\\Desktop\\flash\\sj.swf

Hope that helped.

Offline
Joined: 10/29/2009
thanks for the reply sir,but

thanks for the reply sir,but still i cant follow on how to use C escape.....perhaps the tweaking with Path.Getfilename code solves the problem..(sorry for the very late response sir..i cant access my other account..(lemo214)

Pages

Add new comment

Filtered HTML

  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.