![]() |
|
|||||||||
|
|||||||||
|
| Attention Visitor: |
| You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
||||||
| Discutii Generale Discutii generale despre PHP. |
![]() |
|
|
Thread Tools | Moduri de afișare |
|
|
#1 |
|
32-Bit Member
Data înregistrării: 26.03.2006
Mesaje: 75
Rep Power: 7 ![]() |
salut
Vreau sa-mi apara din baza de date ultimele 5 (10) anunturi adaugate, am cautat si am gasit pt phpbb. Am incercat sa modific aici: Cod:
$query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username FROM $table_topics t, $table_forums f, $table_posts p, $table_users u WHERE t.topic_id = p.topic_id AND f.forum_id = t.forum_id AND t.topic_status <> 2 AND p.post_id = t.topic_last_post_id AND p.poster_id = u.user_id ORDER BY p.post_id DESC LIMIT 5"; plss.. help me. MS :x
|
|
|
|
| Sponsored Links |
|
|
#2 |
|
Guest
Mesaje: n/a
|
Incearca asta:
Cod:
$interogare = "SELECT titlu,id FROM bd ORDER BY id DESC LIMIT 0,5";
$rezultat = mysql_query($interogare) OR die ("Nu se poate executa interogarea!");
while ($rand = mysql_fetch_array($rezultat, MYSQL_BOTH)) {
// blablabla
}
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Moduri de afișare | |
|
|