These are some of the new PHP features:
The PHP implementation is pretty robust now. Most MYSQL_* statements have been dropped and replaced with Database.* Statements, but if you like using the MYSQL_* functions, you can now use the following macros:
More of the functions will be ported soon.
Also, if you work with HTML and JavaScript or jQuery, you will love the new statements:
When querying a PHP script, you can, for example, return a JSON string from an UDT as follows:
When you receive the string in your Javascript code, you can then parse the UDT into an object like this:
This way you can communicate your PluriBASIC script with your Javascript code.
The PHP implementation is pretty robust now. Most MYSQL_* statements have been dropped and replaced with Database.* Statements, but if you like using the MYSQL_* functions, you can now use the following macros:
Code:
MACRO MYSQL_FILL_UDT = DATABASE.load MACRO MYSQL_UPDATE_UDT = DATABASE.update MACRO MYSQL_NEXT_UDT = DATABASE.next MACRO MYSQL_DELETE_UDT = DATABASE.delete MACRO MYSQL_INSERT_UDT = DATABASE.insert MACRO MYSQL_CREATE_TABLE = DATABASE.createtable MACRO MYSQL_DELETE_TABLE = DATABASE.deletetable MACRO MYSQL_TABLE_EXISTS = DATABASE.tableexists MACRO MYSQL_RECORD_EXISTS = DATABASE.recordexists MACRO MYSQL_CONNECT = DATABASE.connect MACRO MYSQL_EXECUTE = DATABASE.execute MACRO MYSQL_ERROR = DATABASE.error MACRO MYSQL_CONNECTED = DATABASE.connected
Also, if you work with HTML and JavaScript or jQuery, you will love the new statements:
Code:
UDT.serialize ' converts an UDT to an URI string. UDT.assign ' reads an URI string unto an UDT (it will soon also support json strings). UDT.json ' Converts an UDT to a json string
Code:
STDOUT UDT.json(someUDTVar);
Code:
var someUDTVar = JSON.parse(phpresult);
Comment