Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
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
Check email address using Regular expressions(ASP)
octal to decimal conversion(PHP)
strip out certain tags(php)
Add to de.licio.us(php)
Java version with php(PHP)
create random file names(VBScript)
app does not appear in ctrl + alt + delete applications list(VB)
Split a string(ASP)

    




Copyright © 2004 by programmershelp.co.uk