Grow your CSS skills. Land your dream job.

mysqli_fetch_all issues

  • # April 10, 2011 at 12:05 pm

    Hello everyone,

    This is, for some reason (programmers block!), escaping me. Unfortunately a site that I am creating for a client is hosted on a PHP version 5.2.17 and the host does not provide PHP 5 >= 5.3. I am wanting to select all values in a specific column in a MySQL database to get a total, but I also want to store each one in a variable to work with later. Ive attempted a few loops but I am failing miserably. Can any one give me some insight on how I would go about this or a good function that is supported in the above listed version.

    As always I appreciate and insight.

    # April 10, 2011 at 12:56 pm

    < ?php
    $query=SELECT * FROM tablename WHERE (conditions);
    $runquery=mysql_query($query);

    while($fetchquery=mysql_fetch_array($runquery))
    {
    $variable=$fetchquery;
    //you can also use sessions if you want to store data for the next pages.
    }



    ?>
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".