2014-12-06 59 views
0

the APIpg_put_line如何知道數據應該插入到哪個表中?

<?php 
    $conn = pg_pconnect("dbname=foo"); 
    pg_query($conn, "create table bar (a int4, b char(16), d float8)"); 
    pg_query($conn, "copy bar from stdin"); 
    pg_put_line($conn, "3\thello world\t4.5\n"); 
    pg_put_line($conn, "4\tgoodbye world\t7.11\n"); 
    pg_put_line($conn, "\\.\n"); 
    pg_end_copy($conn); 
?> 

什麼,如果我有我的,我想用托馬斯架構表?

回答

1

你告訴它寫的是什麼表上一行:

pg_query($conn, "copy bar from stdin"); 
+0

所以'「複製從標準thomas.mytable」'? – 1252748 2014-12-06 22:10:00

相關問題