mirror of
https://github.com/sctn4elk/CustomerRewardsRESTAPI.git
synced 2025-01-10 00:14:30 -06:00
Ideas for uploading image
This commit is contained in:
parent
cbf7f6a127
commit
35c165fbf9
|
@ -44,6 +44,18 @@ class ImageModel extends Database {
|
|||
//$fp=addslashes(file_get_contents($_FILES['image']['tmp_name'])); //will store the image to fp
|
||||
//$query = "CALL insert_loyalty_member_image_proc('{$fileName}','{$fp}');";
|
||||
|
||||
/*
|
||||
* $data = mysql_real_escape_string(fread(fopen($form_data, "r"), filesize($form_data)));
|
||||
|
||||
$result = mysql_query("INSERT INTO binary_data (description, bin_data, filename, filesize, filetype) ".
|
||||
"VALUES ('$form_description', '$data', '$form_data_name', '$form_data_size', '$form_data_type')");
|
||||
|
||||
$id= mysql_insert_id();
|
||||
*
|
||||
* UPDATE t
|
||||
SET blob_col=LOAD_FILE('/tmp/picture')
|
||||
WHERE id=1;
|
||||
*/
|
||||
$query .= "CALL insert_loyalty_member_image_proc (" . $this->memberId . ", " . $this->imageBlob . ")";
|
||||
|
||||
//return var_dump($query);
|
||||
|
|
Loading…
Reference in New Issue
Block a user