MySQLStatement
class MySQLStatement extends Query (View source)
Provides a record-view for mysqli prepared statements
By default streams unbuffered data, but seek(), rewind(), or numRecords() will force the statement to buffer itself and sacrifice any potential performance benefit.
Properties
| protected | mysqli_stmt | $statement | The related mysqli statement object if generated using a prepared query  | 
                |
| protected | mysqli_result | $metadata | Metadata result for this statement  | 
                |
| protected | bool | $bound | Is the statement bound to the current resultset?  | 
                |
| protected | array | $columns | List of column names  | 
                |
| protected | array | $types | Map of column types, keyed by column name  | 
                |
| protected | array | $boundValues | List of bound variables in the current row  | 
                
Methods
Return an array containing all the values from a specific column. If no column is set, then the first will be returned
Return an array containing all values in the leftmost column, where the keys are the same as the values.
Hook the result-set given into a Query class, suitable for use by SilverStripe.
Details
        in 
Query at line 40
                            array
    column(string $column = null)
        
    
    Return an array containing all the values from a specific column. If no column is set, then the first will be returned
        in 
Query at line 61
                            array
    keyedColumn()
        
    
    Return an array containing all values in the leftmost column, where the keys are the same as the values.
        in 
Query at line 77
                            array
    map()
        
    
    Return a map from the first column to the second column.
        in 
Query at line 93
                            array
    record()
        
    
    Returns the first record in the result
        in 
Query at line 103
                            string
    value()
        
    
    Returns the first column of the first record.
        in 
Query at line 117
                            string
    table()
        
    
    Return an HTML table containing the full result-set
        
                            Traversable
    getIterator()
        
    
    Return the next record in the query result.
        
                            int
    numRecords()
        
    
    Return the total number of items in the query result.
        
                            
    __construct(mysqli_stmt $statement, mysqli_result $metadata)
        
    
    Hook the result-set given into a Query class, suitable for use by SilverStripe.
        
                            
    __destruct()
        
    
    No description
        
                    protected        
    bind()
        
    
    Binds this statement to the variables
        
                            void
    rewind()
        
    
    Rewind to the first row