Archive for February, 2007

Borland’s RAD for PHP; to be or not to be

February 28th, 2007 No comments

Borland’s wholly-owned spinoff CodeGear is releasing Delphi for PHP, claimed to be the first RAD visual PHP development environment. PHP 5.0 is required. The product is jointly developed by CodeGear and qadram software and is essentially the first production version of qadram’s qstudio, which never made it past pre-beta.

The IDE is a Delphi lookalike, built with Delphi but distinct from CodeGear’s BDS (Borland Developer Studio). The main point of interest is the component library called VCL (Visual Component Library) for PHP, formerly called WCL (Web Component Library), which is a set of PHP components modelled after Dephi’s VCL, supporting drag-and-drop form editing and customization with a property editor. Existing PHP libraries can easily be wrapped as new VCL for PHP components.

Read the whole story »

Categories: General Articles, PHP Tags:

Use variables in SQL

February 27th, 2007 No comments

What was that ?

Yes.. I mean use variables in SQL. This can be quite interesting, though there may be a lot of people who might comment, that this kills readability, or does not induce even a ray of benefit, well I am not into an argument. And the method I am testing only with MySQL. In several situations, it has proven to be more faster, and as of recent times, we have started to send the whole of the code as a single operation letting mysql to handle the query splitting.

Suppose we need to insert first into a login table, to generate the user_id, which is auto-increment, and then into a set of tables, normally, we would go around insert into the table, then use mysql_insert_id(), to get the last inserted id, to process the rest of the tables. Now think if we used

insert into [table1] (fieldnames) values (values);
select last_insert_id() into @ii;
insert into [table2] (fkId,fieldnames) values (@ii,values);
insert into [table3] (fkId,fieldnames) values (@ii,values);

There are several other example uses for selecting into a variable, but the limitations are that you can select only a single field and single row.

Any comments :

Categories: mysql Tags:

PHP – An Introduction

February 15th, 2007 Comments off

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. PHP uses are widespread, and can include any kind of server functionality that takes user's input a

nd displays or manipulates the input. PHP has different ports, and supports Windows, Unix and Mac, which makes it more accessible than Microsoft Web Technology ASP. This scripting language is growing day by day. PHP5 a fully object oriented platform independent language. The speed on Linux server helps to build large and complex web applications.

What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server. If you were to have a script similar to the above on your server, the client would receive the results of running that script, with no way of determining what the underlying code may be. You can even configure your web server to process all your HTML files with PHP, and then there's really no way that users can tell what you have up your sleeve.
The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer. Don't be afraid reading the long list of PHP's features. You can jump in, in a short time, and start writing simple scripts in a few hours.
Although PHP's development is focused on server-side scripting, you can do much more with it. PHP is not only used for web applications, but also to automate administrative tasks on webservers, like server management, automated backups, database related backups and cron job scripts, one such example is mysql incremental backup solution. Read more…

Categories: General Articles Tags:

Quick Tip

February 14th, 2007 No comments

= explode("\\n",join('',@file("words.txt")));

What does the above code do ?

gets you the words from words.txt, :) if you have one, and strips off the newline character, before assigning each word to array element. otherwise you may need array_walk or foreach to do this..

Categories: Code Snippets Tags:

Tips for Building a Successful WebSite

February 14th, 2007 1 comment

You probably already know the method of making any kind of revenue from the internet depends on a well designed website. What most of us don’t realize (or refuse to admit) is that sites need not have to look perfect or be professionally designed to be successful.

Don’t take it by the literal meaning!

In the short, any site that generates income is a successful site. From a marketing point of view, any site which brings in an income can be considered as a well designed site. Most of us can’t get our heads around this fact: some of the most basic or aesthetically unpleasing sites can be the most profitable. We don’t usually need a perfect site.

Our site need not have to be a killer design to generate revenue. The site which the maintainer designed from scratch now brings in over 50,000 visitors a month and has Google PR6. All that is not really important, what is important is that the site brings in money each and every day! It is a profitable site, it’s not pretty but it works. He earns revenue from Google Adsense, affiliate sales and have even formed partnerships with other sites and businesses on the web.

Read more…

Categories: General Articles Tags: ,

Configure two mysql server and connecting php

February 9th, 2007 2 comments

One would think what is there in configuring two mysql server, or even think what the purpose behind achieving this. Well there are different requirements, and these different requirements may lead to take us through various possiblities. For instance it may be that certain projects may need the advanced features of MySQL 5.2, where as some others could even be run on MySQL 4.12. In my case it was very peculiar and different, in that about half of our projects used transactional tables and other half could go without transactional tables. And we preferred that these two were configured on two different mysql servers. When the system was explained and the need described to the management, they ruled out the option to have different dedicated server for those projects which was not using transactional tables. Thus I thought about configuring multiple mysql server on the same hardware and operating system.

Read more…

Categories: Uncategorized Tags: