Jump to content


Photo

Pagination -_-


  • Please log in to reply
3 replies to this topic

#1 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 09 July 2006 - 08:13 PM

okay i was looking at this detialed tutorial and it said i would need 2 know the totol data of information: i dont understand what this mean http://www.phpnoise.com/tutorials/9/2
Dont Piss me Off today

#2 Gast

Gast
  • Members
  • PipPipPip
  • Advanced Member
  • 131 posts
  • LocationSouth East England

Posted 09 July 2006 - 08:15 PM

The number of records in the datbase:

<?php
$sql = mysql_query("SELECT * FROM table");
$num = mysql_num_rows($sql);
?>


OS and Internet Specs:
Windows XP (with SP2), 1680x1050, PHP 4, MySQL 3, Internet Explorer 6 &7 /FireFox 2.0/Opera 9.2

Tutorials:
Simple Introduction to AJAX and XMLHttpRequest
Creating Live Data with AJAX Making a Google Suggest like application

#3 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 09 July 2006 - 08:37 PM

oh so where you have table add my table and the "mysql_num_rows" counts how many i have am i right?
Dont Piss me Off today

#4 Gast

Gast
  • Members
  • PipPipPip
  • Advanced Member
  • 131 posts
  • LocationSouth East England

Posted 09 July 2006 - 08:50 PM

Yep, just make your query, in this case selecting all records from the database and "mysql_num_rows()" returns the number of results. Also, I would recommend taking a look at phpfreak's tutorial: http://www.phpfreaks...orials/73/0.php
OS and Internet Specs:
Windows XP (with SP2), 1680x1050, PHP 4, MySQL 3, Internet Explorer 6 &7 /FireFox 2.0/Opera 9.2

Tutorials:
Simple Introduction to AJAX and XMLHttpRequest
Creating Live Data with AJAX Making a Google Suggest like application




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users