All output is based on your MySQL table structure.
MySqlPHPwriter reads your database, and gives you the possibility of getting code for in two categories: SQL and PHP. Here we have a closer look at the SQL-code it generates:
The SQL-section outputs the 3 most used commands for sql embedded in php:
- select
- update
- insert
As example we'll use the tables for Joomla, as this is the CMS system we are using. The table jos_banner has the following structure:

To select all of these fields by name, or almost all of them you need to do a fair bit of typing.
But now there is another option:

After mysqlphpwriter is installed and confiures, click the "insert"-link next to jos_banner (the table we are working on)
This will give us the following code ready for copying from the browser:
INSERT INTO jos_banner (
cid
, type
, name
, alias
, imptotal
, impmade
, clicks
, imageurl
, clickurl
, date
, showBanner
, checked_out
, checked_out_time
, editor
, custombannercode
, catid
, description
, sticky
, ordering
, publish_up
, publish_down
, tags
, params
)
VALUES(
'$cid'
, '$type'
, '$name'
, '$alias'
, '$imptotal'
, '$impmade'
, '$clicks'
, '$imageurl'
, '$clickurl'
, '$date'
, '$showBanner'
, '$checked_out'
, '$checked_out_time'
, '$editor'
, '$custombannercode'
, '$catid'
, '$description'
, '$sticky'
, '$ordering'
, '$publish_up'
, '$publish_down'
, '$tags'
, '$params'
)
So that saved us quite a bit of typing. Whoa. Lets move on. Try the next link, "Update"
UPDATE jos_banner
SET cid = '$cid'
, type = '$type'
, name = '$name'
, alias = '$alias'
, imptotal = '$imptotal'
, impmade = '$impmade'
, clicks = '$clicks'
, imageurl = '$imageurl'
, clickurl = '$clickurl'
, date = '$date'
, showBanner = '$showBanner'
, checked_out = '$checked_out'
, checked_out_time = '$checked_out_time'
, editor = '$editor'
, custombannercode = '$custombannercode'
, catid = '$catid'
, description = '$description'
, sticky = '$sticky'
, ordering = '$ordering'
, publish_up = '$publish_up'
, publish_down = '$publish_down'
, tags = '$tags'
, params = '$params'
WHERE bid = '$bid'
And to finish things up, we'll have a go at the last one. Remeber, all the code you have seen here has been generated by the script for us, and all we have done is some copy and paste.
So we click "list". This gives us a regular select. You could use select * from .... but if you want 17 out of 34 fields you have to type the field names in. Here you can copy all, and then remove the ones you do not need:
SELECT bid
,cid
,type
,name
,alias
,imptotal
,impmade
,clicks
,imageurl
,clickurl
,date
,showBanner
,checked_out
,checked_out_time
,editor
,custombannercode
,catid
,description
,sticky
,ordering
,publish_up
,publish_down
,tags
,params
from jos_banner
So if you seem to remember having typed in SQL like this, you will sava a lot of time. Do not tell your customer about it, just bill him as if you spent much more time. After all, thats what the customer is used to..




