Your Ad Here

 Navigation

Home
Source code
Tutorials
RSS feeds
Articles
Books
Software
Downloads
Hosting
manuals
Forums
Script directory
Training
Our Links

 Sponsors
 Links
software directory
wwwstores
domain names
 Downloads
 Misc

Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming


count the number of rows ina MySQL database

count the number of rows ina MySQL database

//database can be found at http://programmershelp.co.uk/mysqldatabase.php

<?php
//connect to server with username and password, this is the default settings
//when MySQL is installed on Windows XP(Not recommended)
$connection = mysql_connect ("localhost","root", "") or die ("Cannot make the connection");
//connect to database
$db = mysql_select_db ("test",$connection) or die ("Cannot connect to database");
//our SQL query
$sql_query = "SELECT * FROM test";
//store the SQL query in the result variable
$result = mysql_query($sql_query);
$rows = mysql_num_rows($result);
//output total
echo $rows;

?>







Books
 Sponsors
 Random Code
date and time example(date/time)

Better image resizing function(image)

Search a text file(string)

 Random Article
  Network

Programming resources
Tutorials directory
General bid directory
sell software, make money
Find me wholesalers
Find me dropshippers
Free recipes online/a>
UK products and price comparison
Anime videos
Free lyrics search
free stuff
UK stores
Gambling directory
Sexy free wallpapers
Hosting resources
ASP site
Golf resources
iPod resources
Coupons and deals
Baby names
Domain names
Dating site
Scripts directory
Maxi directory
bigarticle : free articles
dawgwitch search
List of directories






beginners PHP Copyright © 2004 onwards by beginnersPHP.