This code it work but put everything ("timestamp8","Last","TradePrice", ,"TradeFlags") into filname column How can I change it I want to put only "gel" into filname (inthis case $table = gel )
I try 'gel' it say Parse error: syntax error, unexpected 'gel' (T_STRING) in
Please suggest
$sql ='INSERT INTO pong8_maintable ("filname","timestamp8","Last","TradePrice", "TradeFlags"
) 
SELECT
"gel" ,
cast(public.'.$table.'."Timestamp" as timestamp) ,
cast(public.'.$table.'."Last" as numeric)  ,
cast(public.'.$table.'."Trade Flags"as varchar)
FROM Public.'.$table; 
sc_exec_sql($sql);
