Hier kan je LivPHP downloaden. Houdt in je achterhoofd dat dit nog niet eens een beta of alpha versie is: het is het 1e prototype. Er zullen nog veel betere, stabielere en nettere versies uitkomen. Heel LivPHP gaat nog herbouwt worden. Deze downloads zijn alleen nog om LivPHP uit te proberen. Daadwerkelijk gebruik ervan is niet echt een geweldig idee, alhoewel het project al wel lijkt te werken.
Neem ook een kijkje in ./livphp/classes/object.sql.php. In dit bestand staan alle SQL functies die je kan gebruiken als je eenmaal ./settings/sql.php hebt aangepast.
Je kan de functies in static context gebruiken. Als je meerdere SQL databases wilt gebruiken kan je een nieuwe sql-object aanmaken als volgt: $sqlinstance = new sql(SERVER,USER,PASSWORD,DATABASE);. De volgende functies zijn aanwezig:
<?
//livphp4/classes/object.sql.php
(null) $var = sql::set_defaults($host,$user,$pass,$database);
//Used to set the default login for a SQL-instance.
//Will be used to login when an SQL function is used that require a connection to the database.
(object) $sql = new sql($host,$user,$pass,$database,$setAsDefault);
//Used to create a new SQL instance.
(object) $sqlinstance = sql::init($host,$user,$pass,$database);
//Public use is deprecated. static-only function.
(null or false) $var = $sql->as_default();
//Will force the SQL-instance as an default instance.
//The default instance is used in static context.
(bool) $connectionsuccesfull = $sql->connect($host,$user,$pass,$database);
//Used by the sql->__construct function if all parameters are set.
(string) $sql_escaped_string = sql::escape($string);
//Equal to mysql_real_escape_string, but shorter.
//Recommended when multiple sql-instances are used!
(resource) $result = sql::query($query);
//The old-fashion mysql_query();
(resource) $result = sql::unbuffered_query($query);
//equal to mysql_unbuffered_query();. Disables the buffer for less memory use.
//check php.net for more info about the function.
(bool) $freed = sql::free($queryresult);
//frees an sql-resource.
//check for mysql_free_result() @ php.net.
(int) $int = sql::query_result_int($query);
//uses sql::query() and fetches the first row and column and converts it to an INT.
(int) $time = sql::query_result_unixtime($query);
//uses sql::query() and fetches the first row and column and converts it to an unix timestamp.
//quite useless since i know "SELECT UNIX_TIMESTAMP(time) FROM table WHERE id = 1 LIMIT 1".
(array) $row = sql::query_result_row($query);
//uses sql::query() and fetches the first row as an numeric-array with mysql_fetch_row();.
(array) $row = sql::query_result_assoc($query);
//uses sql::query() and fetches the first row as an assoc-array with mysql_fetch_assoc();.
(array) $rows = sql::query_result_auto($query,$indexkey,$allowmultidimensional,$autoformat);
//Uses sql::unbuffered_query() to fetches a lot of rows and applies an auto-format on the results.
//test this function yourself, it's pretty usefull to get long lists of results.
(int) $deleted_rows = sql::delete($sql_from,$sql_where);
//deletes 1 or more rows from the given database table.
//being applied like this:
//"DELETE FROM `$sql_from` WHERE $where", so remember to escape your WHERE-data.
//returns the number of affected rows with mysql_affected_rows().
(int) $affected_rows = sql::update($sql_table,$values,$sql_where);
//updates 1 or more rows in the given database table.
//$values must contain an assoc-array where the key's represents the column-names
//and the values the values to change to. The values will be escaped using sql::escape.
//remember to escape the $sql_where.
(int) $insert_id = sql::insert($in_sqltable,$values)
//inserts a single row into the given database table.
//$values must contain an assoc-array where the key's represents the column-names
//and the values the values to change to. The values will be escaped using sql::escape.
(array) sql::$queries
//static variable containing ALL CALLED QUERIES in any sql-instance from any function in this class.
(instance) sql::$default_instance
//static variable containing the default SQL instance where all static-function-calls will refer to.
?>
| Time Created: | File Size: | Filename: |
|---|---|---|
| 2009-06-05 00:07:21 | 57.65 kB | livphp4_p3.0_prototype_release.zip |
| 2009-06-05 00:07:21 | 47.28 kB | livphp4_p3.0_prototype_update_to_3.1_prototype_beta.zip |
| 2009-08-21 19:29:13 | 24.26 kB | livphp_4.0.0.0.zip |
Op dit moment wordt er nog hard gewerkt aan de ontwikkeling van LivPHP. Indien je interesse hebt kan je je aanmelden voor de mailing list.
Je zult nooit meer dan 2 nieuwsbrieven per maand ontvangen. We hebben echter geen vast schema; We sturen je een e-mail wanneer er een grote verandering is in de voortang van het project.