I have a table and I am using its contents PHP and sometime (); I have around three fields in the table that are tapes, but there may be changes, but I want them to still be able to display all the results in my table.
However, it only shows records with data in each field, how can I display it? I get a count of the table and it gives me 2, but only displays one.
& lt; H3 & gt; View all updates & lt; / H3 & gt; & Lt; H4 & gt; Below are all active updates for COTC & lt; / H4 & gt; & Lt; Table & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Site Name & lt; / Th & gt; & Lt; Th & gt; Page & lt; / Th & gt; & Lt; Th & gt; & Lt; / Th & gt; & Lt; Th & gt; Date sent & lt; / Th & gt; & Lt; Th & gt; View & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; & Lt ;? Please add updates.c_id = clients.c_id INNER on the Inner Joining page, completed by php $ sql = "SELECT sname, page_name, date_submitted, u_id, clients.c_id, flag, updates completed by page.php = pages.p_id order date_submit DESC "; $ Query = mysql_query ($ sql) or die (mysql_error ()); While ($ line = mysql_fetch_array ($ query)) {$ full = $ line ['full']; If ($ full == 1) {print '& lt; Tr class = "quiet" & gt; '; } Other {Print '& lt; Tr & gt; '; } Print '& lt; Td & gt; ' $ Line ['snom']. '& Lt; / Td> '; Print '& lt; Td & gt; ' $ Line ['page_name']. '& Lt; / Td> '; Print '& lt; Td> $ Line ['flag'] '& Lt; / Td> '; Print '& lt; Td & gt; ' $ Line ['date_submitted']. '& Lt; / Td> '; Print '& lt; Td square = "center" & gt; & Lt; A href = "? C = displayupdate & amp; id = '. $ Line [' u_id ']." "Title =" 'Update' for '$ line [' sname '].' "Id =" '. $ Row ['u_id']. "" & Gt; & Lt; Img src = "image / page_edit page" alt = "edit entry!" / & Gt; & Lt; / A & gt; & Lt; / TD & gt; '; Print '& lt; / Tr & gt; '; }? & Gt; & Lt; / Tbody & gt; & Lt; / Table & gt;
Your PHP is printing back every line correctly I believe That your problem is in the query.
in the updated Inner join client with updates SELECT sname, page_name, date_submitted, u_id, clients.c_id, flag, updates.c_id = clients.c_id INNER JOIN Update
This line will return only one row if it matches one in , then match in updates
client and pages
is. If you want to add customer
or pages
to optional (in an update
line in c_id
or INNER JOIN
s to LEFT JOIN
s s s s> Page of NULL < / Code> will also come back. Div>
Comments
Post a Comment