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
list service in a listbox(VB.net)
Open notepad when a key is pressed(VB)
Pop up window(Javascript)
check for a valid date(php)
GIF creation with PHP(php)
show all files in a directory(VB.net)
Create a link(ASP.net)
Move a file(ASP)

    




Copyright © 2004 by programmershelp.co.uk