Posts RSS Comments RSS

Archive for the 'Delphi for PHP' Category

Delphi for PHP - INSERT with QUERY

If you don’t know very well the VCL for PHP and you try to insert a new record using a Query component, you will likely get this error:
Application raised an exception class ADODB_Exception with message ‘mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LIMIT 0,10′ at line …
A workaround for this is to disable the LIMIT command at runtime or design-time by setting LimitStart and LimitCount to ‘-1′;
An example how to disable this at runtime:

$query = “INSERT INTO table (field1,field2) VALUES(’” . $value1 . “‘,’” . value2 . “‘)”;

$this->Query1->close();
$this->Query1->LimitStart = ‘-1′;
$this->Query1->LimitCount = ‘-1′;
$this->Query1->SQL = $query;
$this->Query1->open();

I got this solution after studying the ECommerce sample project.

Delphi for PHP - I just got an extra day trial licence :)

Two weeks ago, I bought Delphi for PHP. I waited impatiently for the release in 22 march. The release was delayed about one week, but that wasn’t very important. I contacted the reseller to mail me the serial key and license file for the product, but they don’t have it yet. They suggested to download the trial version and use that until I get the mail I asked for. No problem. I went to the download page and I was shocked. 1 day trial? WTF am I gonna do with that? I hoped it was a mistake, a joke. I’ve downloaded (Downloads (keys where required)) it and installed it. I played with it for a while, but not very much because I had other things to do. Next day evening, I’ve opened it again, I’ve put some stuff on a form (text boxes, buttons etc) and suddenly it stopped responding. I thought it has a bug, or something. I closed it, opened it again and I found out that the license had expired (1 day of trial expired :( ). I searched on google how to extend this at least until I get the license from the reseller I bought Delphi for PHP from. I found nothing. I even searched cracks and keygen’s (naughty me :D;). Nothing yet. I was very impatient to get it work because I saw there some cool samples to play with (Web Services, eCommerce). My final solution was to try desperately something very simple that only a noob will think of: get another trial license from codegear. I went to Delphi for php download page, applied for another licence at Keys Only (If you have a CD) link, and got one. It works (2 hours now :D;). I used the same account I got first one from. Is CodeGear aware of this? (if not, shh, don’t tell them yet). I hope this trick will work for others, not only for me.
So, a short recap:
Go to Delphi for php download page.
If you haven’t already got Delphi for php, get the product from Downloads (keys where required).
After one day of trial expired, go to the same page, get a new license from Keys Only (If you have a CD), and you will get another day of testing.
Maybe tomorrow I’ll be able to get a new extra trial day somehow. A new one each day at least until I’ll get the license I payed for :)!

Delphi for PHP

Citeam niste forumuri cand dau de urmatoarea expresie: “Delphi® for PHP”. WTF? Prima data am crezut ca e vreo greseala. Dau un search pe google si gasesc asta. Nu pot sa cred. Nici nu visam la asa ceva. M-am bucurat mai mult decat daca ar fi castigat Steaua in meciul cu Sevilia. Prea multe detalii nu am apucat sa citesc, dar din video’urile demo de pe site, e cel mai tare IDE for PHP ever! Si pe deasupra si singurul RAD for PHP. Nici nu am cuvinte. Ca sa intelegeti cauza uimirii mele, trebuie sa ma confesez: sunt un fan Delphi (folosesc Delphi inca de la versiunea Delphi 3) si de cateva luni de zile m-am reprofilat pe limbaje de web development, printre care PHP si JS.Quick Review: Delphi for PHP contine componente care se adauga la proiect prin drag&drop, code management, suport AJAX si baze de date MySQL & altele etc. I’m happy now :D.
D4PHP1