Click here to Skip to main content
15,883,829 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: detect client language Pin
Jassim Rahma22-Dec-11 0:06
Jassim Rahma22-Dec-11 0:06 
GeneralRe: detect client language Pin
Graham Breach22-Dec-11 2:41
Graham Breach22-Dec-11 2:41 
GeneralRe: detect client language Pin
jan lucas22-Dec-11 1:04
jan lucas22-Dec-11 1:04 
JokeRe: detect client language Pin
Luc Pattyn22-Dec-11 2:06
sitebuilderLuc Pattyn22-Dec-11 2:06 
GeneralRe: detect client language Pin
jan lucas22-Dec-11 2:23
jan lucas22-Dec-11 2:23 
AnswerRe: detect client language Pin
Luc Pattyn22-Dec-11 2:35
sitebuilderLuc Pattyn22-Dec-11 2:35 
AnswerRe: detect client language Pin
Avinashwli23-Dec-11 0:41
Avinashwli23-Dec-11 0:41 
Questionpaging the result Pin
Jassim Rahma20-Dec-11 3:29
Jassim Rahma20-Dec-11 3:29 
Hi,

I am currentlly using this code to populate news from my database. I want to know how can I make the same paging the result with NEXT and PREVIOUS button?

PHP
<?php
    $conn = mysql_connect('mysql.jassimrahma.com', 'jassimxxxxx', 'xxxxxxx');
    mysql_select_db("jassimrahma", $conn);
    $result = mysql_query("SELECT news_id, news_title, date_format(created_date, '%d %M %Y') as 'news_date' FROM news ORDER BY created_date DESC, news_id DESC", $conn);

    $affected_rows = mysql_num_rows($result);

    echo "<table width='100%' cellpadding='3' cellspacing='3'>";

    while ($i < $affected_rows)
    {
        $news_id = mysql_result($result, $i ,"news_id");
        $news_title = mysql_result($result, $i ,"news_title");
        $created_date = mysql_result($result, $i ,"news_date");

        echo "<tr>";
        echo "<td align='center' valign='top'>";
        echo "<img src='http://www.jassimrahma.com/images/news_arrow.jpg' alt='Jassim.com News' />";
        echo "</td>";
        echo "<td align='left' valign='top'>";
        echo "<a href='http://www.JassimRahma.com/$news_id' target='_blank'>$news_title</a>";
        echo "</td>";
        echo "</tr>";

        $i++;
    }

    echo "<tr><td align='center' valign='top'></td><td align='left' valign='top'><a href='http://www.JassimRahma.com/news' target='_self'><img src='images/more_news.jpg' alt='Technology News - JassimRahma.com' /></a></td></tr>";
    echo "</table>";
?>

AnswerRe: paging the result Pin
Mohibur Rashid20-Dec-11 21:53
professionalMohibur Rashid20-Dec-11 21:53 
Questionbest way to determine mobile device Pin
Jassim Rahma19-Dec-11 0:24
Jassim Rahma19-Dec-11 0:24 
AnswerRe: best way to determine mobile device Pin
User 171649219-Dec-11 0:57
professionalUser 171649219-Dec-11 0:57 
AnswerRe: best way to determine mobile device Pin
Mohibur Rashid19-Dec-11 18:00
professionalMohibur Rashid19-Dec-11 18:00 
GeneralRe: best way to determine mobile device Pin
Jassim Rahma19-Dec-11 21:43
Jassim Rahma19-Dec-11 21:43 
GeneralRe: best way to determine mobile device Pin
Gerben Jongerius19-Dec-11 22:30
Gerben Jongerius19-Dec-11 22:30 
GeneralRe: best way to determine mobile device Pin
Jassim Rahma20-Dec-11 1:19
Jassim Rahma20-Dec-11 1:19 
GeneralRe: best way to determine mobile device Pin
Gerben Jongerius20-Dec-11 1:40
Gerben Jongerius20-Dec-11 1:40 
GeneralRe: best way to determine mobile device Pin
Jassim Rahma20-Dec-11 2:07
Jassim Rahma20-Dec-11 2:07 
GeneralRe: best way to determine mobile device Pin
Jassim Rahma20-Dec-11 3:21
Jassim Rahma20-Dec-11 3:21 
AnswerRe: best way to determine mobile device Pin
Mohibur Rashid19-Dec-11 22:47
professionalMohibur Rashid19-Dec-11 22:47 
QuestionLinux Back Track 5 Pin
HARISHCHOWDHARY18-Dec-11 20:40
HARISHCHOWDHARY18-Dec-11 20:40 
AnswerRe: Linux Back Track 5 Pin
Richard MacCutchan18-Dec-11 23:36
mveRichard MacCutchan18-Dec-11 23:36 
QuestionHow to configure email system in xampp server Pin
VickyVicki16-Dec-11 1:41
VickyVicki16-Dec-11 1:41 
AnswerRe: How to configure email system in xampp server Pin
Aniruddha Loya19-Dec-11 8:29
Aniruddha Loya19-Dec-11 8:29 
GeneralRe: How to configure email system in xampp server Pin
VickyVicki24-Dec-11 0:02
VickyVicki24-Dec-11 0:02 
GeneralRe: How to configure email system in xampp server Pin
Aniruddha Loya24-Dec-11 7:48
Aniruddha Loya24-Dec-11 7:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.