User Profile

Collapse

Profile Sidebar

Collapse
panhandle
panhandle
Last Activity: Mar 1 '09, 08:22 PM
Joined: Feb 27 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • panhandle
    replied to Adding a image to a existing file
    in PHP
    That did the trick----Thanks For all the help
    See more | Go to post

    Leave a comment:


  • panhandle
    replied to Adding a image to a existing file
    in PHP
    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"),
    See more | Go to post

    Leave a comment:


  • panhandle
    replied to Adding a image to a existing file
    in PHP
    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
    ...
    See more | Go to post

    Leave a comment:


  • panhandle
    replied to Adding a image to a existing file
    in PHP
    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")),
    ...
    See more | Go to post

    Leave a comment:


  • panhandle
    replied to Adding a image to a existing file
    in PHP
    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:
    ...
    See more | Go to post

    Leave a comment:


  • panhandle
    replied to Adding a image to a existing file
    in PHP
    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;
    ...
    See more | Go to post

    Leave a comment:


  • panhandle
    replied to Adding a image to a existing file
    in PHP
    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...
    See more | Go to post
    Last edited by Atli; Feb 28 '09, 10:48 PM. Reason: Added [code] tags.

    Leave a comment:


  • panhandle
    replied to Adding a image to a existing file
    in PHP
    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...
    See more | Go to post

    Leave a comment:


  • panhandle
    replied to Adding a image to a existing file
    in PHP
    I am not sure what it is called to be honest with you. But I will certainly take your word on it.
    See more | Go to post

    Leave a comment:


  • panhandle
    started a topic Adding a image to a existing file
    in PHP

    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
    See more | Go to post
No activity results to display
Show More
Working...