Guest User

Untitled

a guest
Jan 19th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. function getPicByAlbumt($query)
  2. {
  3. $sqlStr = "SELECT TOP 10 * FROM tbl_albumpictures WHERE album_Id = ? ".$query;
  4. return $sqlStr;
  5. }
  6.  
  7. <?php
  8. $sqlu = getPicByAlbumt("order by rating");
  9. if ($result2u = $mysqli->prepare($sqlu))
  10. {
  11. $rekzak = 76;
  12. $result2u->bind_param("i",$rekzak);
  13. $result2u->execute();
  14. $result2u->store_result();
  15. $rows2u = $result2u->num_rows;
  16. }
  17. if($rows2u>0)
  18. {
  19. $rowu = fetch($result2u);
  20. for($g=0; $g<$rows2u; $g++)
  21. {
  22. $picname = $rowu[$g]["pic_name"];
  23. ?>
  24. <div style="float:right; width:115px; height:96px; background:url(<?=$site_url?>/images/t/girlpicbg.png); margin-right:1px; margin-top:2px;">
  25. <img src="<?=$site_url?>/uploads/albums/<?=$picname?>" style="width:106px; height:88px; margin-top:3px; margin-right:6px;" />
  26. </div>
  27. <?php
  28. }
  29. }
  30. ?>
  31.  
  32. SELECT * FROM tbl_albumpictures WHERE album_Id = ? LIMIT 10
  33.  
  34. SELECT...
  35. FROM...
  36. WHERE...
  37. ORDER BY...
  38. LIMIT 10
Add Comment
Please, Sign In to add comment