|
-
January 23rd, 2006, 12:08 PM
#16
Re: Writing BLOB with ODBC and PHP to Access
How about: $content="line1\r\nline2" ??
-
January 23rd, 2006, 12:23 PM
#17
Re: Writing BLOB with ODBC and PHP to Access
I added Pipes:
$content="line1\r\nline2" ;
print "<br>|".$content."| ";
and the Result is:
|line1 line2|
-
January 23rd, 2006, 12:29 PM
#18
Re: Writing BLOB with ODBC and PHP to Access
 Originally Posted by Player1005
I added Pipes:
$content="line1\r\nline2" ;
print "<br>|".$content."| ";
and the Result is:
|line1 line2|
You need to try these strings in your query, not print them out.
PHP Code:
$content = "line1\r\nline2"; /* custom stirng here */
fclose($fp);
if(!get_magic_quotes_gpc())
{ $fileName = addslashes($fileName); }
print $fileName;
print $fileSize;
print $fileType;
$query = "INSERT INTO file (filename, filesize, filetype, filecontent ) VALUES ('$fileName', '$fileSize', '$fileType', '$content')";
Which ones cause the query to fall over?
-
January 23rd, 2006, 12:47 PM
#19
Re: Writing BLOB with ODBC and PHP to Access
Now it looks as if the upload would have been succesful.
But how can I upload a file?
Last edited by Player1005; January 23rd, 2006 at 01:00 PM.
-
January 23rd, 2006, 02:24 PM
#20
Re: Writing BLOB with ODBC and PHP to Access
A character in the file is causing the query to fail, this could either be quotes or white space characters. Did you test your query with all those strings? Did any of them cause the query to fail?
Also, try printing the entier query before you execute it, find the exact location at which it fails and you will have the character which is cuasing the problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|