troubleshooting Question

PHP Put variable in sql postgresql scriptcase

Avatar of teera
teera asked on
5 Comments2 Solutions463 ViewsLast Modified:
the code below when i put table name it work then i put variable name  {TabName}  it does not work how can i fix it

Parse error: syntax error, unexpected 'scriptcase' (T_STRING) in C:\Program Files (x86)\NetMake\v81\wwwroot\scriptcase\app\Pong8\bla nk\index.php on line 1142

I  do with scriptcase it a php deleloping tool
sc_lookup(Dataset, "SELECT  tablename FROM pg_catalog.pg_tables
where schemaname = 'public'and tablename not like 'pong8%' order by tablename") ;

{TabName} = {Dataset[33][0]};

echo "{TabName} " ;

$sql ='INSERT INTO pong8_maintable ("timestamp8","Last","TradePrice", "TradeVolume" , "BestBid") 

cast(public.'.{TabName}.'"Timestamp" as timestamp) ,

cast(public.'.{TabName}.'"Last" as numeric)  ,
cast(public.'.{TabName}.'"Trade Price" as numeric)  ,  
cast(public.'.{TabName}.'"Trade Volume" as numeric),
cast(public.'.{TabName}.'"Best Bid" as numeric)
FROM Public.'.{TabName}.'  ;
Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros