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

Subscribe to our newsletter
Partners
Testimonials
Piter Jason: "I wanted to take this opportunity to thank SQL Maestro Group for providing me the tools to succeed. I have no doubt that without them I would have failed to do my job. I am proud that I have suceeded. Thank you".
Samuel Poole: "I recently downloaded and ordered MySQL Data Wizard, and I thought I would drop you a note to let you know that it is the software I needed . Well done, keep up the good work, and please accept my very best regards. Please feel free to use the contents of this e-mail along with my name, as an endorsement of your excellent product".

More

Add your opinion

Data Wizard for MySQL online help

Prev  Return to chapter overview Next 

Lookup options

One of useful features in the process of PHP scripts generation provided by Data Wizard for MySQL consists in the availability of field lookup options for PHP Generator Wizard helping you to customize the html appearance of your MySQL databases for easy and efficient operating your data in the future.

 

If you take two tables which are linked by a master-detail relation, you can enable lookup options for the field which represents the foreign key. Bringing the IDs stored in one table field into correlation with the names stored in another table allows the target html page to contain all the correlated data. As a result, while working with the site you will only need to select the required names instead of entering the IDs.

Select the foreign table name with data appropriated to the field data in the List table drop-down list.
Use the Key field box to specify the field with the similar data.
Set the field to appear in the List field box.

 

See the simple example of the php script generation with enabled lookup options below.

 

Note: The default lookup options for foreign keys are enabled respectively.

 

Note: Since last version Data Wizard for MySQL supports list lookup option. It allows you to enter corresponding to the field data manually.  For ENUM fields the default lookup options are enabled respectively (MySQL and PostgreSQL).

 

 

Let see the table:

 

CREATE TABLE customers (

  customer_id INTEGER NOT NULL PRIMARY KEY,

  customer_name CHAR(30NOT NULL,

  customer_country INTEGER NOT NULL,

)

 

The next table contains the data about the customer countries:

 

CREATE TABLE countries (

    country_id INTEGER NOT NULL PRIMARY KEY,

    country_name CHAR(30NOT NULL,

  )

 

The html appearance of the first table with disabled lookup option is like shown below:

 

 

This is the way the result HTML table looks when generated with lookup option enabled in the process of PHP generation:

 

 



Prev  Return to chapter overview Next