php - Script skips 1 data on output from database -
fetch_object ()) {$ id = $ row-> Msg_id; $ Mes = $ row- & gt; message; $ Mas = nl2br ($ mess); $ Cdate = $ row- & gt; Date_past; $ Msg = "{$ mes}
{$ Cdate}"; // wall =============================================== ====? & Gt; & Lt; Li class = "bar"> php echo $ id ;; & gt; & Gt; & Lt; Div align = "left" class = "post_box" & gt; & Lt; Span style = "padding: 10px" & gt; & Lt ;? Php echo $ msg; ? & Gt; & Lt; / Span & gt; & Lt; Span class = "delete_button" & gt; & Lt; A href = "#" id = "& lt ;? php echo $ id ;; & gt; Class = "delete_update" & gt; X & lt; / A & gt; & Lt; / Span & gt; & Lt; Span class = 'feed_link' & gt; & Lt; A href = "#" class = "comment" id = "& lt; php echo $ id ;? gt;" & Gt; Comment & lt; / A & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; Div id = 'expand_box' & gt; & Lt; Div id = 'expand_url' & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "fullbox" class = "fullbox"> php echo $ id ;; & gt; & Gt; & Lt; Div id = "commentload & lt ;? php echo $ id;? & Gt;" & Gt; & Lt; / Div & gt; & Lt; Div class = "comment_box" id = "c & lt ;? php echo $ id ;; & gt; & Gt; & Lt; Form method = "post" action = "" name = "& lt ;? php echo $ id ;; & gt; & Gt; & Lt; Textarea class = "text_area" name = "comment_value" id = "textera query:
msg_id message date_sent client_id 1 one 1/1/1 1 2 b2 / 2 / 2 1 to 3 c 3/3/3 1 to 4 d 1/2/3 1 to 5 E 2/2/2 2 7E 2/2/2 2 8g 2/2/2 2 9F 8/8 / 8 3 This will only display
7E 2/2/2 2 8g 2/2/2 2 2/2/2
/ P>
There will be no output, but it should be displayed:
9 f 8/8/8 3 Can I check the script here that I Am doing wrong
You are calling
$ row = $ result- & Gt; Fetch_assoc (); Before you start looping on the results:
while ($ line = $ result-> fetch_object ()) {...} The result is the effect of leaving the first line in the result set (because you do nothing with $ row from the first call.).
Comments
Post a Comment