Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Get ALL global variables Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: May 29 2012 at 18:42 | IP Logged Quote MrGibbage

Is there a way I could get all global variables and their current values? I am
thinking about doing this from an app connecting to the PowerHome Socket server.
Probably a direct sql statement??? And while we are at it, how about getting a list
of all macros?

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
JaredM
Newbie
Newbie


Joined: November 04 2007
Online Status: Offline
Posts: 36
Posted: May 30 2012 at 00:05 | IP Logged Quote JaredM

Try this. It'll give you back CRLF-separated rows with TAB-separated columns. There are a few other delimiter optons too...1=commas, 2=XML, 3=HTML.

Code:
ph_sql(0, "SELECT id, value FROM global_variables")


Also

Code:
ph_sql(0, "SELECT id, key_desc FROM macroheader")
Back to Top View JaredM's Profile Search for other posts by JaredM
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: May 30 2012 at 05:55 | IP Logged Quote MrGibbage

That should do it. Thanks :)

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum