Oracle sql statement to store blob images with PHP -


hi have question regards storing images oracle sql developer database through use of php. have created column in table accepts blob data types.

take instance have html form submit , store image database

html form

<form action ="image.php" method ="post" enctype="multipart/form-data"> <input type ="file" name ="pic" accept ="image/*"/> <input type ="submit" value ="submit" name ="submit"/> </form> 

image.php

$_file = $_files[pic]; $filenmae = $_file['name']; $imagedata = file_get_contents($_file['tmp_name']); $sql ="insert sql statement here" 

what have write in sql statement work? tried inserting entire imagedata database got returned ora-0097(which means value i'm trying insert exceeds limit of characters) exception.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -