Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getPicByAlbumt($query)
- {
- $sqlStr = "SELECT TOP 10 * FROM tbl_albumpictures WHERE album_Id = ? ".$query;
- return $sqlStr;
- }
- <?php
- $sqlu = getPicByAlbumt("order by rating");
- if ($result2u = $mysqli->prepare($sqlu))
- {
- $rekzak = 76;
- $result2u->bind_param("i",$rekzak);
- $result2u->execute();
- $result2u->store_result();
- $rows2u = $result2u->num_rows;
- }
- if($rows2u>0)
- {
- $rowu = fetch($result2u);
- for($g=0; $g<$rows2u; $g++)
- {
- $picname = $rowu[$g]["pic_name"];
- ?>
- <div style="float:right; width:115px; height:96px; background:url(<?=$site_url?>/images/t/girlpicbg.png); margin-right:1px; margin-top:2px;">
- <img src="<?=$site_url?>/uploads/albums/<?=$picname?>" style="width:106px; height:88px; margin-top:3px; margin-right:6px;" />
- </div>
- <?php
- }
- }
- ?>
- SELECT * FROM tbl_albumpictures WHERE album_Id = ? LIMIT 10
- SELECT...
- FROM...
- WHERE...
- ORDER BY...
- LIMIT 10
Add Comment
Please, Sign In to add comment