The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hi,
I want the SQL query statement in phpmyadmin to extract the main threads with its title and content without posts"replies" . Thank you |
|
#2
|
|||
|
|||
|
Code:
SELECT thread.title, post.pagetext FROM thread INNER JOIN post ON thread.firstpostid = post.postid |
| 2 благодарности(ей) от: | ||
| akafi, RaYdeN.ADM | ||
|
#3
|
|||
|
|||
|
Quote:
I have another question if i want to change dateline from table thread and transfer it to another table in a row date but with format 0000-00-00 00:00:00 How can i do that? Thanks |
|
#4
|
|||
|
|||
|
Just wrap the from_unixtime function around the dateline column.
Code:
SELECT thread.title, post.pagetext, from_unixtime(thread.dateline) AS date FROM thread INNER JOIN post ON thread.firstpostid = post.postid |
|
#5
|
|||
|
|||
|
Yeah it is work fine.Thank you Dave you are my hero.Now i transfer the threads and the date into another table but if i want to not include some forums threads into the new table.i have the forums ids and i want to except its threads.How can i do that in the same SQL statement?
|
|
#6
|
|||
|
|||
|
By doing a NOT IN check:
Code:
SELECT thread.title, post.pagetext, from_unixtime(thread.dateline) AS date FROM thread INNER JOIN post ON thread.firstpostid = post.postid WHERE thread.forumid NOT IN(10,11,12,13) |
| Благодарность от: | ||
| MarkFL | ||
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|