I open my sq3d fine, but when I try to do a SELECT on one of my tables it seems to not return the results I excpect. Here is the php code:
$buildingArray = array();
class MyDB extends SQLite3
{
function __construct()
{
$this->open('Database.s3db');
}
}
$db = new MyDB();
$query1 = "SELECT * FROM tbl_uploadData";
$result1 = $db->query($query1);
$u = $result1->fetchArray();
echo "<br/>Size of u: ".sizeOf($u)."<br/>";
for($i=0; $i<sizeOf($u); $i++){
echo "<br/>Items: ".$u[$i]."<br/>";
}
This is what is in my Database:
tbl_uploadData : b_id - 1,2,3,4 : where 1,2,3,4 are the items within the fields, b_id the field name and tbl_uploadData the table.
I expect to get 1, 2, 3 and 4 to return in the fetchArray()
All i get in return is:
Size of u: 2
Items: 1
Notice: Undefined offset: 1 in C:\xampp\htdocs\PHPexcel\Tests\StrategicExcel.php on line 72
Items: