Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SQLite3 fetchArray row (NOT A QUESTION)

Comments in 'Resources' started by MinePocket Servers, Apr 25, 2016.

  1. MinePocket Servers
    Offline

    MinePocket Servers Active Member

    Joined:
    Mar 6, 2014
    Posts:
    69
    Minecraft User:
    MinePocket
    Since the php manual doesn't document this imma put it here for future people to find. When you use fetchArray() it only returns one row and not all the rows. You will need to loop the function in a while loop to get all results. fetchArray will return false once it is over and start from beginning.

    PHP:
    while ($result $query->fetchArray())
            {
                
    //do stuff here, DO NOT $query->fetchArray() again, use $result.
            
    }
  2. MinePocket Servers
    Offline

    MinePocket Servers Active Member

    Joined:
    Mar 6, 2014
    Posts:
    69
    Minecraft User:
    MinePocket
  3. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215

Share This Page

Advertisement