Member
Member
absolutex   2008-09-13, 06:33
#1
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 "."&image=".$data["filename"]."]<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

Sad

help me pls...
Member
Member
code   2008-09-13, 06:41
#2
http://www.zenphoto.org/support/topic.php?id=2020#post-11844
I hope this is what your looking for...
Member
Member
absolutex   2008-09-13, 06:57
#3
Thanks but I want to random image external site Confused
Member
Member
krainbolt   2008-09-13, 07:03
#4
absolutex - You can use backtick ( ` ) characters to display code in this forum.
Member
Member
code   2008-09-13, 07:32
#5
You want to what? You can if you use zenphoto as a plugin...
http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin
Member
Member
absolutex   2008-09-13, 07:45
#6
when i used Random Image for external site plugin i got

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..
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.