Hi didik, Indeed, PHP-SQLB API is a special one, but that is part of its advantages, because, it is a very simple API, that consist of 2 functions. You should get the wrappers functions available is the following documentation :
The first function is used to execute request that return some results. The result are automatically stored in a hash and an array in order you can easily access it.
The second is useful to execute other request that doesn't return anything like delete, update, etc.
With this API, you avoid all the SQL classic bloody mess like :
connect ...
prepare ...
execute...
while not finish
fetch row...
get field ...
... instruction ...
end while
free result ...
disconnect ...
instead you have :
if exec sql ok
do something with result[id_row][field_name]
fin if
And the API is the same with all the database backend.
Obviously, if you already have an entire site using mysql native PHP API, it could be a hard work to convert all the thing :-/
Hope that will help,
Have a nice day,
GrumZ
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is SQLB use special API (like SQL Relay) or can work with PHP (native) API??
Hi didik, Indeed, PHP-SQLB API is a special one, but that is part of its advantages, because, it is a very simple API, that consist of 2 functions. You should get the wrappers functions available is the following documentation :
http://sourceforge.net/docman/display_doc.php?docid=9896&group_id=28058
The first function is used to execute request that return some results. The result are automatically stored in a hash and an array in order you can easily access it.
The second is useful to execute other request that doesn't return anything like delete, update, etc.
With this API, you avoid all the SQL classic bloody mess like :
connect ...
prepare ...
execute...
while not finish
fetch row...
get field ...
... instruction ...
end while
free result ...
disconnect ...
instead you have :
if exec sql ok
do something with result[id_row][field_name]
fin if
And the API is the same with all the database backend.
Obviously, if you already have an entire site using mysql native PHP API, it could be a hard work to convert all the thing :-/
Hope that will help,
Have a nice day,
GrumZ