Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using a mysql resource with multiple functions

    hi,

    I would like to be able to query a database once. and use the result multiple times between functions. The $query; variable works fine the first time but dies after i try to use another function with the same $query; variable.
    PHP Code:
    $db = new MYSQL();
    $sql "SELECT * FROM games WHERE result='u' ORDER BY game_id DESC";
    $query $db->Query($sql);
    DisplayAll($db$query);
    echo 
    '<p>';
    ShowAT($db$query); 

    any suggestions?
    tnx
    Last edited by ClubCosmic; 02-25-2007 at 11:00 PM.

  • #2
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Perhaps you might have to move the internal pointer back to the beginning?
    Omnis mico antequam dominus Spookster!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •