Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Fetch Modes in PDO statement

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 353
    Comment on it

    PDO statement uses the setfetchmode() method to set the default fetch mode.

    PDOStatement::setFetchMode($mode)
    

    $mode: mode is a valid value pass to fetch() method.

    Some of the commonly used fetching modes are:

    PDO::FETCH_ASSOC: returns the associative array indexed by column name.

    PDO::FETCH_BOTH (default): return both the associative and numeric array.

    PDO::FETCH_NUM: return the numeric array.

    PDO::FETCH_OBJ: returns as an object

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: