Jump to content

ivanAdolfo

New Members
  • Posts

    2
  • Joined

  • Last visited

ivanAdolfo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I try it using quotes as well and the INTO 'tablename' and the error still the same. I will do what you suggest... storing your image files in the filesystem and putting the metadata (such as filename) in the table. Thanks.
  2. insertImg: $sql="`user`, `id`, `imageName`, `imageType`, `imageSize`, `imgeContent`) VALUES ($wuser,$id, $imgName, $imgType, $imgSize,$imgContent)"; Values: XY(user varchar)=1(id int)=noticiacallampa.jpg(imageName varchar)=image/jpeg(imageType varchar)=31 kB(imageSize varchar)=imgContent (longlob it comes from file_get_contents($image) Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'kB,????' at line 5 in C:\xampp\htdocs\_website\liceoUtil\php\liceoFuncs.php:79 Stack trace: #0 C:\xampp\htdocs\_website\liceoUtil\php\liceoFuncs.php(79): mysqli_query(Object(mysqli), 'INSERT INTO `li...') #1 C:\xampp\htdocs\_website\liceoIUpload.php(32): insertImg(Object(mysqli)) #2 {main} thrown in C:\xampp\htdocs\_website\liceoUtil\php\liceoFuncs.php on line 79 line 79: $result = mysqli_query($conn, $sql); thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.