User Profile
Collapse
-
That did the trick----Thanks For all the help -
Did the modifications-all went well except it does not display my image when downloaded. Is it because it is set to "text"
Code:GetSQLValueString($_FILES['file']['tmp_name'], "text"),
Leave a comment:
-
Tried the $FILES array and now get this
Code: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 ' FileMime=, FileSize=, FileData=, ToolNumber='CH-47914-3' WHERE FileID=43' at line 1PHP Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in C:\Inetpub\wwwroot\newtools\1.php on line 8 PHP Warning: mysql_real_escape_string() expects
Leave a comment:
-
Something mor like this?
Code:GetSQLValueString($_FILES['file'], ("name")), GetSQLValueString($_FILES['file'], ("type")), GetSQLValueString($_FILES['file'], ("size")), GetSQLValueString($_FILES['file'], ("tmp_name")), GetSQLValueString($_POST['textfield'], ("text")),
Leave a comment:
-
Well It didn't work! Here is what I got
Code: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 ' FileMime=, FileSize=, FileData=, ToolNumber='CH-47914-3' WHERE FileID=43' at line 1PHP Notice: Undefined index: file in C:\Inetpub\wwwroot\newtools\1.php on line 39 PHP Notice: Undefined index: file in C:\Inetpub\wwwroot\newtools\1.php on line 40 PHP Notice:
Leave a comment:
-
Ok I think I may have it. Here is the code I came up with:
Code:<?php require_once('file:///C|/Unnamed%20Site%202/Connections/database.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
Leave a comment:
-
here is the build of the table
[code=mysql]
CREATE TABLE tooltable (
FileID Int Unsigned Not Null Auto_Increment,
FileName VarChar(255) Not Null Default 'Untitled.txt',
FileMime VarChar(50) Not Null Default 'text/plain',
FileSize BigInt Unsigned Not Null Default 0,
FileData MediumBlob Not Null,
Created DateTime Not Null,
ToolNumber Text(30) Not Null,
ToolLocation...Leave a comment:
-
Hi Atli
What I have is a database built off of you post "Uploading files into a MySQL database using PHP ". The STRUCTURE is basicly the same with a few more
colm. added to it. What I am trying to do is add a image to records that do not have one or change the ones that are already stored in the data base. If I try to use the code that you wrote for adding it will duplicate the entry giving me one record with a image and one...Leave a comment:
-
I am not sure what it is called to be honest with you. But I will certainly take your word on it.Leave a comment:
-
Adding a image to a existing file
Is there a way to add a image to existing data in a batabase without corrupting.
The database is stuctured for images
No activity results to display
Show More
Leave a comment: