For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > May 2006 > question about PDO and sqlite3









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author question about PDO and sqlite3
Jack

2006-05-25, 9:57 pm

Hi, all

I'm testing sqlite3 with PDO with following
--------
<?php
$dsn = 'sqlite:d:\temp\cntdata.db3';
try{
$myConn = new PDO($dsn);
} catch (PDOException $e){
echo $e->getMessage();
}
foreach($myConn->query( 'select docketno from cntt_sales1',
PDO::FETCH_ASSOC) as $row){
print_r ($row);
}
print 'here';
?>
-----
And I got the following error:

Warning: Invalid argument supplied for foreach() in
//xserver1\www\desktop\testSqlite3.php on line 8
here

Please give me an advice, thank you very much!

Jack


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com