<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1025261" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1025261</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/prtingin-mysql-rows#comment-1153679</link>
    <description> &lt;p&gt;oh, you want to print off your sql tables entirely?&lt;/p&gt;
&lt;p&gt;column names and fields?&lt;/p&gt;
&lt;p&gt;I already showed you how to count the rows, only you don&#039;t seem to mean &quot;row&quot; when you say row... You want to count every single cell? I think it would be advisable for you to go to &lt;a href=&quot;http://www.mysql.com&quot; class=&quot;bb-url&quot;&gt;mysql.com&lt;/a&gt; and learn the terminology so you can express your question in way that we can all understand so we don&#039;t confuse you further!&lt;/p&gt;
&lt;p&gt;Anyway, if you know the column names, you can do what I told you earlier, only you&#039;ll identify them as such:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$sql &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;SELECT * FROM mydb\&quot;; &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$qry&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;); &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$numrows&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_count_rows(); &lt;br /&gt; &lt;br /&gt;echo \&quot;There are &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$numrows&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; records in this database&amp;lt;br /&amp;gt;They are as follows:&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;\&quot;; &lt;br /&gt; &lt;br /&gt;echo&amp;lt;&amp;lt;&amp;lt;OPENTABLE&lt;br /&gt;&amp;lt;table width=\&quot;100%\&quot; id=\&quot;listing\&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;Column Name&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;Column Name&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;Column Name&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;Column Name&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;OPENTABLE;&lt;br /&gt;while (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_fetch_array(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$qry&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)) { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo&amp;lt;&amp;lt;&amp;lt;ROW&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;title1&#039;]&amp;lt;/td&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;title2&#039;]&amp;lt;/td&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;title3&#039;]&amp;lt;/td&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;title4&#039;]&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;ROW;&lt;br /&gt;}&amp;nbsp; &lt;br /&gt;echo \&quot;&amp;lt;/table&amp;gt;\&quot;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 22 Jun 2004 22:08:07 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1153679 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/prtingin-mysql-rows#comment-1153677</link>
    <description> &lt;p&gt;I mean I&#039;d like to view some table in database in &quot;excel-style&quot;.&lt;br /&gt;
It could help a lot if somebody told me how to count those titles (I mean the fields in database).&lt;/p&gt;
 </description>
     <pubDate>Tue, 22 Jun 2004 21:00:50 +0000</pubDate>
 <dc:creator>Keripukki</dc:creator>
 <guid isPermaLink="false">comment 1153677 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/prtingin-mysql-rows#comment-1153675</link>
    <description> &lt;p&gt;Thanks for you&#039;re answers,&lt;br /&gt;
But what if I have something like this in my table:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt; &lt;br /&gt;titles &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;| &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;titles 2 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;| &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;titles 3 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;....&lt;br /&gt;----------------------------------------&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row&lt;br /&gt;row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now I&#039;d like to print those all titles to web page and print row under each. Count of titles is different in every of my tables... so I&#039;d could be nice if I could print any of them with same script. Now I have to manually define how many titles there are and then query rows for each&lt;/p&gt;
 </description>
     <pubDate>Tue, 22 Jun 2004 20:22:33 +0000</pubDate>
 <dc:creator>Keripukki</dc:creator>
 <guid isPermaLink="false">comment 1153675 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/prtingin-mysql-rows#comment-1153673</link>
    <description> &lt;p&gt;Can you provide a small sample of how you would like the output displayed and the table setup?&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Tue, 22 Jun 2004 17:51:07 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1153673 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/prtingin-mysql-rows#comment-1153671</link>
    <description> &lt;p&gt;Use a while loop.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$sql &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;SELECT title FROM mydb\&quot;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$qry&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$numrows&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_count_rows();&lt;br /&gt;&lt;br /&gt;echo \&quot;There are &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$numrows&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; titles in this database&amp;lt;br /&amp;gt;They are as follows:&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;\&quot;;&lt;br /&gt;&lt;br /&gt;while (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_fetch_array(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$qry&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;title&#039;]&amp;lt;br /&amp;gt;\&quot;;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;See &lt;a href=&quot;http://www.mysql.com&quot; class=&quot;bb-url&quot;&gt;mysql.com&lt;/a&gt; for details on how to pull more selective information and sort it using the SELECT statement, and &lt;a href=&quot;http://www.php.net&quot; class=&quot;bb-url&quot;&gt;php.net&lt;/a&gt; on how to use while loops and others to get that information displayed.&lt;/p&gt;
 </description>
     <pubDate>Tue, 22 Jun 2004 15:55:01 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1153671 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
