Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $stmt = $db->prepare("SELECT post_id,content,date,category_id,lp_title,lp_image,lp_canonicalUrl,lp_url,lp_desc,lp_iframe,lp_iframe_id
- FROM post_items inner JOIN user ON post_items.user_id = user.user_id
- WHERE post_items.user_id = ? order by post_items.post_id desc LIMIT ?,?");
- $stmt->bind_param('iii', $userid, $itemStart, $itemEnd);
- $stmt2 = $db->prepare("SELECT photo_upload.img_src FROM photo_upload inner JOIN post_items ON post_items.photo_set_id = photo_upload.photo_set_id
- WHERE post_items.photo_set_id = photo_upload.photo_set_id ");
- if ($stmt2->execute()) {
- $photo_items = $stmt2->get_result();
- while ($obj2 = $photo_items->fetch_object()) {
- $jsonData[] = $obj2;
- }
- $i2 = json_encode($jsonData);
- }
- if($stmt->execute()){
- $post_items = $stmt->get_result();
- if(mysqli_num_rows($post_items) > 0){
- while ($obj = $post_items->fetch_object()) {
- $jsonData[] = $obj;
- }
- $i = json_encode($jsonData);
- echo $i;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment