Insert path string into Mysql

From: Date: Mon, 18 Nov 2002 19:10:06 +0000
Subject: Insert path string into Mysql
Groups: php.db 
Request: Send a blank email to php-db+get-23449@lists.php.net to get a copy of this message
Hi, I have the following code, but it doesn't works. How can I insert a path string into a MySql Varchar cell? The result is always FALSE, but if $path is a normal string ($path ='demo') than it works fine. What can I do? (I use WInXp, Apache, and Php4.2.2) Thanks! <?php $database="PH"; mysql_connect(localhost,"root",""); @mysql_select_db($database) or die( "Unable to select database"); $path = 'c:\\demo\\' ; $query = "insert into PH_PHOTO (PHOTO_PATH) VALUES ('$path')"; $result=mysql_query($query); mysql_close(); ?>

« previous php.db (#23449) next »