September 10th, 2013, 09:49 AM
Join Date: Mar 2006
Time spent in forums: 5 h 42 m 25 sec
Reputation Power: 8
How about now
How about now? I had it displaying the first name before I created the while loop but now I can't get it to display anything other than "Database is here". What I wan't it to od is display each column side by side, so it would pretty much bu the row seperated by spaces. Below is were I'm at now.
$db = new SQLite3('./et.sqlite3', SQLITE3_OPEN_READWRITE);
echo "Could not open/access DB";
echo "Database is here\n";
$row = $db->query("select fname FROM customers");
//$display = $name->fetchArray(SQLITE3_NUM);
$i = 0;
while($display = $row->fetchArray(SQLITE3_NUM));
echo $display[i]." ";
Originally Posted by DonR
you forgot the $ in front of name on your query line.
echo "Database is here";
$name = $db->query("select fname FROM customers WHERE fname = Garrett");
but, I don't believe you will be able to "echo" that query result as I believe $name will end up being an object, not a string...so, you will have use fetch and then echo whatever you "fetch".