PHP 7.0.6 Released

SQLite3Result::numColumns

(PHP 5 >= 5.3.0, PHP 7)

SQLite3Result::numColumnsReturns the number of columns in the result set

Description

public int SQLite3Result::numColumns ( void )

Returns the number of columns in the result set.

Parameters

This function has no parameters.

Return Values

Returns the number of columns in the result set.

User Contributed Notes

jwzumwalt at neatinfo dot com
5 years ago
Here is an example:

<?php
   $query
= "SELECT * FROM 't1' ";
  
$result = $db->query($query) or die("Error in query: <span style='color:red;'>$query</span>");
  
$num_columns $result->numColumns();
?>

[Edited by: googleguy@php.net]
To Top