After creating table it shows this Array ( [0] => 00000 [1] => [2] => )

lonniedesert

New Member
After creating table using exec() in PDO,it shows like this\[code\]Array ( [0] => 00000 [1] => [2] => )\[/code\]Is this an error or did I successfully create my table?When I looked up in the database the table is created.this is what i executed\[code\]try{ $tbl = new PDO("mysql:host=localhost;dbname=myDB",'root',''); $tbl->exec("CREATE TABLE test(fld1 CHAR(40),fld2 CHAR(40))") or die(print_r($tbl->errorInfo(),true)); }catch(Exception $e){ echo $e.getMessage(); } \[/code\]@Vikas,correct me if i am wrong.and this is working \[code\] $queryTBl="CREATE TABLE test(fld1 CHAR(40),fld2 CHAR(40))"; $evaluateTBL=tbl->exec($queryTBL); if ($evaluateTBL===false) print "Test table could not be created"; else print "Successfully Created";\[/code\]
 
Back
Top