I am able to retrieve images from a single table without problem, but I'm not sure how it can work if I have images in different tables. Say I have two tables (images and category) which can contain images
images category
-gallery_id -cat_id
-image_id -image
-image
Yani hangi tabloyu belirtmek için sorgu dizesinde başka bir parametresi iletebilirsiniz anlamaya
if(mysql_escape_string(@$_GET['type']) === 'icon')
$PHPTHUMB_CONFIG['mysql_query'] = 'SELECT `image` FROM `category` WHERE (`cat_id` = \''.mysql_escape_string(@$_GET['id']).'\')';
else
$PHPTHUMB_CONFIG['mysql_query'] = 'SELECT `image` FROM `images` WHERE (`image_id` = \''.mysql_escape_string(@$_GET['id']).'\')';
Bu bir iyi çalışır
foreach($database->images->gallery_id($gal_id) as $v)
{
$img = "<img src=\"/test/include/phpThumb_1.7.9/phpThumb.php?w=150&id={$v->image_id}\" />";
echo "<li>{$img}</li>";
}
'Türü Forbidden parametre' Bu başarısız
echo "<img src=\"/test/include/phpThumb_1.7.9/phpThumb.php?w=150&type=icon&id={$database->category($v->cat_id)->cat_id}\" />";
Ben kod aracılığıyla arıyor ama parametreleri 'izin' hangi ayarlar her yerde görmüyorum.
So my questions are: Is this a good way to get images from multiple tables? If yes, how can I allow the 'type' parameter? I guess I could just put all images in one table but it doesn't seem like a good idea to me...
ps I posted this on the phpthumb support forum but didn't get any response, so I'm trying here. Haven't had much time to look into it since, hopefully I can make more time this weekend.
Herkes merak ediyordum ben $ veritabanı nesnesi için crdb kullanıyorum.