Hi i have successfully saved to mySQL database the files uplaoded using jQuery-PHP FileUpload with the answer from this thread as guide. Now my questiion is, is it possible to only just show the images from my database according to the users who uploaded the imgs? since i also save the users along with the filename.? I dont have idea on how to do it, or whant and where to insert the codes, or is it possible.
EDITED: I have now idea where it initialize the loading of image
protected function get_file_object($file_name) {
if ($this->is_valid_file_object($file_name)) {
$file = new stdClass();
$file->name = $file_name;
$file->size = $this->get_file_size(
$this->get_upload_path($file_name)
);
$file->url = $this->get_download_url($file->name);
foreach($this->options['image_versions'] as $version => $options) {
if (!empty($version)) {
if (is_file($this->get_upload_path($file_name, $version))) {
$file->{$version.'_url'} = $this->get_download_url(
$file->name,
$version
);
}
}
}
$this->set_file_delete_properties($file);
return $file;
}
return null;
}
Now i want to insert this mySql query which filter the images that will only show, but i don't know how.
SELECT desc FROM images WHERE userid=1