Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Philipp Gerber: "

The product is so easy and super built that you can achieve visible and great success after a short time. Also very much possible with the product. A class product. I'm already looking forward to the next versions and extensions. Keep it up.

Support to the product is just perfect. Each Support request is quickly and very competent solved. Also various assistance, which does not fall into a support, are also perfectly processed. There is a direct wire to the manufacturer / developer and this is notth. Thanks for the class Support".

David Lantz: "Thank you, this is by far the simplest, and most friendly utility for building db record system I have ever used. I wish I could get my systems guys at the office to purchase this for our company would be so very helpful and speed up a lot of work. I for one have used it for everything from a simple inventory record of my house, to a members record for my church just little pet projects and a test bed to test my own db builds and theories before having to hand code at the office..... it is a lot of fun to work with".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

Configuring datasources

PHP Generator for MySQL creates webpages aimed at interaction with MySQL tables, views, and queries throw the web. This chapter explains how to manage data sources your pages are based. Live Demos.

 

List of data sources

This list displays all data sources pages of your website are based on. The Status column indicates if a data source is OK or provides a brief description of the problem that must be solved before the data source can be involved into the project (a more detailed description is displayed in bottom part of the window). The Create top-level page column indicates whether a top level page for this data source should be created (this option usually turned OFF for queries and views to be used only as lookup data sources).

 

Adding tables and views

To add a table or a view as a page data source, open the Select object window with the corresponding button.

 

Adding queries

To add a query, type the query text in the Query editor or load it from an .sql file with More > Load query from file... Moreover you can use queries stored a single .qrp file (query repository). This feature may be extremely useful if you need to share a set of the same queries between several different projects. To save/load queries to/from a single file, use More > Save all queries as repository / Load query repository items from the More button menu accordingly.

 

Invalid queries

PHP Generator automatically validates data sources and displays names of invalid queries in red; in this case the reason of the problem is displayed in the Status column. Please follow these simple rules to get your query valid.

 

Key columns

PHP Generator automatically inspects all data objects for key columns that are required for single-record operations like view, edit, and delete. For tables you have to define primary key constraints at the database level, for views and queries it is necessary to define key columns at this step of the wizard. If key columns are not defined for a data source, it is marked with No key columns label and a confirmation is displayed on moving to the next step. If one of the primary key columns in your updatable query or a view is autoincrement, set the appropriate flag to allow correct locating the newly record added via inline or modal forms.

 

Please note that you must define key columns for all data sources involved into the project including lookup data sources; otherwise duplicate records can be displayed in the data grid.

 

 

Set SQL statements

This button allows you to provide Insert, Update, and Delete statements for views and queries. These statements can be omitted if you don't plan to support insert, update, and delete operations for the corresponding page. If a view is updatable at the database level, these statements can be omitted as well: in this case they will be generated automatically (as for tables).

 

Views vs Queries

What is preferable: create a view in the database or a query directly in PHP Generator? We would recommend you to use views always when possible as in this case all business logic is concentrated in a single place (database). The only suitable exception is the case when you for some reasons cannot modify the database schema.



Prev Return to chapter overview Next