<php
// db connection stuff here....
$query = "select count(*)
from manufacturers";
|$result = mysql_query($query);
||while ($row = mysql_fetch_array[$result)) {
echo $row[0];
}
?>
|<php
// db connection stuff here....
$query = "select NAME_FIELD,
from manufacturers";
|$result = mysql_query($query);
$x = 1;
||echo "<table>";|
|
while ($row = mysql_fetch_array[$result)) {
echo "<tr><td>" . $x , "</td><td>" . $row[0] . "</td></tr>";
$x++;
}
echo "</table>";
?>|
Suzi wrote:
> I am working with a MySQL database and PHP. I need to do a count of
> the records in the database table and output them to a script. I need
> a simple way to do this. The table is called "manufacturers".
>
>
> I will also need to do a list of the manufacturers and number them.
> Using their auto-assigned ID numbers will not do because we will be
> adding and subtracting manufacturers from time to time and there will
> be holes in the sequential numbers.
>
> Can anyone help me with this? If you are able to, please email
> [EMAIL PROTECTED]
>
> Thank you....
> Suzi
>
>
>
>
>
>
> Community email addresses:
> Post message: [email protected]
> Subscribe: [EMAIL PROTECTED]
> Unsubscribe: [EMAIL PROTECTED]
> List owner: [EMAIL PROTECTED]
>
> Shortcut URL to this page:
> http://groups.yahoo.com/group/php-list
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/