DB
i have
zp_albums ID parent folder
1 NULL furniture
4 1 furniture/chair
3 NULL wood-sculpture
zp_images ID albumid filename title
1 4 1.jpg sometitle
3 3 2-1.jpg sometitle
in my file
<?php
$cate_id = '3,4';
$pagelen = 10;
$conn = mysql_connect("localhost", "xxx", "xxx");
mysql_select_db("xxx");
$sql = "SELECT * FROM zp_albums a,zp_images b";
$sql .= " WHERE a.id = b.albumid IN ($cate_id)";
$sql .= " ORDER BY ";
$sql .= " b.id ";
$sql .= " DESC ";
$sql .= " LIMIT 0 , $pagelen ";
$result = mysql_query($sql);
while ($data = mysql_fetch_array($result)) {
echo "
<img src='./albums/".$data["folder"]."/".$data["filename"]."' alt='".$data["title"]."' border='0' class='frame-thumb-gallery' />";
}
?>
Two problem in my code
".$data["folder"]." is alway show funiture
help me pls...
Comments
I hope this is what your looking for...
http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin
Fatal error: Call to a member function getAlbumName() on a non-object in C:\AppServ\www\wood\products\zp-core\template-functions.php on line 3042
in file
@readfile('http://127.0.0.1:81/wood/products/zp-core/random.php?num=1&height=50&width=50&class=one-image&album=wood-sculpture');
-
".$data["folder"]." is alway show funiture
what is wrong in my code ? pls..