I want to fetch multiple posts with categories and tags currently I’m using this query:
$pagesize = 20; $pageNumber = 1; $mysql = mysqli_query($con,"SELECT p.post_title, p.ID, p.post_content, p.post_date, p.post_name as url, t.name as category_name FROM wp_posts p, wp_terms t, wp_term_relationships r, wp_term_taxonomy tt WHERE p.post_status='publish' AND tt.taxonomy = 'post_tag' AND p.id=r.object_id AND r.term_taxonomy_id=tt.term_taxonomy_id AND tt.term_id = t.term_id ORDER BY p.post_date desc LIMIT ".(int)($pageNumber*$pageSize).",".(int)$pageSize."") or die ("error".mysqli_error($con));
The mysqli-connection works. But when I run this code, I only get a blank page. How can I fix this?
- Marathoners run pillar to post to recover money from agent
- Driver Surrenders In Fatal Hit-And-Run After Abandoning, Covering Damaged Tesla
- Is Mitt Romney Running for Senate? All Twitter Signs Point to Yes.
- How to Make OS X’s Finder Tags Work for You
- A Step-by-Step Guide to Your First Microsoft Power Query Script
- Reduce Finder Clutter and Mac Junk With Aliases, Tags, and More
- National Board Of Review Winners: ‘The Post’ Comes Up Strong With Best Pic, Best Actress Meryl Streep, Best Actor Tom Hanks
- Akshay Kumar Does Not Want The ‘Action Hero’ Tag, Is Comfortable Acting In All Genres
- Kamala Harris very much qualified to run for US Prez: NJ Guv
- Teen, 17, who has to wear an electronic tag after being caught with a machete says it makes him feel depressed and 'like a caged animal' - but his mum says it's the 'best thing to happen to him'