what function is used to know the no. of rows returned from the database in case of an odbc connection?

Posted on 2009-04-28
Last Modified: 2012-05-06
mysql_num_rows() is the function used to know the no. of rows returned from the database.

when we use odbc connection, what function we need to use to know  the no. of rows returned from the database .i am using mdb as database.
Question by:designersx
    LVL 10

    Expert Comment

    dim lngRecords as long
    rst.movelast 'must move to last record to get full record count
    lngRecords = rst.recordcount

    Author Comment


    sir i am using the php language, so i don't think this syntax would work in php.
    LVL 16

    Expert Comment

    by:Chris Harte
    You have answered your own question. mysql_num_rows returns the number of rows in a result.

    $result = mysql_query("SELECT * FROM table1", $link);
    $num_rows = mysql_num_rows($result);
    echo $num_rows." Rows\n";


    Author Comment

    >>You have answered your own question, haha
    <<no, sir

    i am not using mysql as database. i am using mdb as database and in that mysql_num_rows will not be used . i am using an odbc connection to deal with mdb database.
    LVL 16

    Accepted Solution

    My bad. All the odbc functions are listed here

    The one you want is

    Author Closing Comment


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now