Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 14th, 2005, 06:13 AM
Friend of Wrox
 
Join Date: Dec 2004
Location: London, London, United Kingdom.
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default How many Result?

Current code:

$Nbline=0;
$query = "SELECT * FROM Table_Article WHERE Article_Subject LIKE '$RecallSubject' ORDER BY Article_Date";
  $result = mysql_query($query)
       or die ("Problem encounter ".mysql_error());
  while ($row = mysql_fetch_array($result))
  {
     extract($row);
$Nbline=$Nbline+1;
}

How do I get the amount of lines without extracting all the rows (ie time saving!)

Thank you :)

Reply With Quote
  #2 (permalink)  
Old April 15th, 2005, 03:37 PM
Authorized User
 
Join Date: Jan 2005
Location: , , .
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default

use
mysql_num_rows


----------------
Never bother to learn something not knowing which does not do you any harm, and never neglect to learn something whose negligence will increase your ignorance - Imam Jafar Sadeq
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Result of Transformation PKHG BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 4 August 6th, 2008 10:57 AM
Search Result batott ASP.NET 2.0 Professional 1 June 5th, 2008 08:39 AM
GridView and SQL More than one result = one result DarkForce ASP.NET 2.0 Basics 0 July 20th, 2007 04:29 AM
keyword doesn't appear with result gilgalbiblewheel Classic ASP Databases 2 January 11th, 2005 12:45 AM
Result set jemacc SQL Server 2000 0 December 19th, 2003 07:26 PM



All times are GMT -4. The time now is 11:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.