Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript Site
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


Counting the amount of rows

 

<?php
//connect to server with username and password
$connection = mysql_connect ("localhost","program_iain", "iain06") or die ("Cannot make the connection");
//connect to database
$db = mysql_select_db ("program_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;

?>

 


 

 

lets see it then


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
using the md5 function to encrypt data(php)
blinking label(VB)
date and time example(PHP)
another word counting example(php)
Email example(ASP.net)
Empty recycle bin(C)
Write to a text file and display the contents(Powershell)
round form example(VB)

    




Copyright © 2004 by programmershelp.co.uk