How to get data from a SQL database to a AMX Netlinx System using PHP

Posted By Tom / November, 16, 2008

 

As part of a system upgrade I did a year or so back (Remote studio system)I needed to get data back from a SQL database. At the time AMX did have a way of doing this it involved using ASP pages with predefined SQL queries. But this system needed to be more flexible, I wanted to be able to send SELECT,UPDATES and INSERTS directly from the AMX Code.

This is the way the system passes the information:

 

AMX-PHP-SQL

I will add a like to php and amx code shortly.

Fireworks, Blackheath

Posted By Tom / November, 10, 2008

 

Fireworks Clapham Common

5th November Bonfire pics

Posted By Tom / November, 6, 2008

IMG_0394.JPG

I will be going to Blackheath bonfire night on Saturday, I will hopefully get some good shots there with the DSLR.

How to select data from 2 different tables

Posted By Tom / November, 3, 2008

Tables : CustomerTBL , OrdersTBL

CustomerTBL

custID        custName
1                Tom
2                Laura

OrdersTBL

orderID    custID        OrderTotal
300          1                10
301          2                20
302          1                5

Requirement

Customer Name, orderID and OrderTotal for Tom with 1 SQL queery

SQL Query

SELECT a.custName , b.orderID , b.OrderTotal
FROM CustomerTBL as a INNER JOIN OrdersTBL as b ON a.custID = b.custID
WHERE a.custName = ‘Tom’

Result

custName    orderID    OrderTotal
Tom             300          10
Tom             302          5

A present

Posted By Tom / October, 30, 2008

A friend at work got this for me as a geeky present!! Thanks

Tom Tit Moves house