Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT `posts`.`id`
- AS `postid`,
- `posts`.`title`
- AS `title`,
- `posts`.`introduction`
- AS `introduction`,
- `posts`.`body`
- AS `body`,
- `posts`.`publication_date`
- AS `publication_date`,
- `post_categories`.`name`
- AS `name`,
- `posts`.`author_id`
- AS
- `author_id`,
- Concat('http://politis-final.codingninjas.io/fromoldsite/images/',
- `photos`.`image`) AS `IMGPATH`,
- Concat(`authors`.`name`, ' ', `authors`.`surname`)
- AS `AuthorFullname`
- FROM ((((`posts`
- LEFT JOIN `posts_categories`
- ON(( `posts`.`id` = `posts_categories`.`post_id` )))
- LEFT JOIN `post_categories`
- ON(( `posts_categories`.`post_category_id` =
- `post_categories`.`id` )))
- LEFT JOIN `photos`
- ON(( `posts`.`image_id` = `photos`.`id` )))
- LEFT JOIN `authors`
- ON(( `posts`.`author_id` = `authors`.`id` )))
- WHERE ( ( `posts`.`created_at` < '2018-01-01 00:00:00' )
- AND ( `posts`.`published` = 1 )
- AND ( NOT(( `photos`.`image` LIKE '%polpictures%' )) ) )
- ORDER BY `posts`.`id`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement