siz : 1 numfld : 5
2018-12-17 14:02:03
Today we are going to add an analysis table into Wordpress.

You may refer to pages pg=15020 and pg=15025. This 2 pages is group by f01 and count on f06.

Lets say you have engaged a few writing services to maintain your blog. Now you want to record down how much trafic attract by each writing services per day/week.

1) Add a new database into Ipsunflez by selecting [Database], [Database], [New] (pg=11000,pgs=7). So lets say the new Database number zdb(f01) number is 5, Add a new config file at ahidden by copying the config4.php, rename it as config5.php, change the $username and $password into the respective username and password, $database as wordpress. Modify the following lines :
$sqllink4=mysqli_connect... into $sqllink5=mysqli_connect....
mysqli_select_db($sqllink4, ... into mysqli_select_db($sqllink5, .

2) Add a new table into Ipsunflez by selecting [Database], [Table] [New](pg=11050,pgs=7). Lets take care of the numbering, so lets number the ztbl_no(f01) as 1010050, ztbl_name(f02) as wp_traffic, zdb11050(f03) by selecting the database you just added at 1) above.

3) Now we need to add the fields into Ipsunflez by selecting [Database], [Table Field], [New (Multiple)](pg=11100,pgs=6). So we can create new table using Ipsunflez just as this example :
f01 f02 f03 f04 f05 f06 f07 f08
1010050 traffic_id 1010050 INT 11 Y
1010051 post_id 1010051 BIGINT 20 N
1010052 date 1010052 DATE N
1010053 traffic 1010053 INT 11 N
1010054 remarks 1010054 TEXT Y

4) Now you may create the table you keyed in step 3). Select [Database], [Create MySQL table]. Then select [New], Select wp_traffic, click [Insert] button. Then the Create table SQL command being displayed, click [Create table] button to create the table.

5) Repeat step 2) and 3) by adding table wp_posts, You don't have to add the whole table, just addding field ID and post_title is enough, lets field ID being 1010001, post_title being 1010002.

6) Now you may add this 2 new form created in step 3) and 5) by refering to tutorial [Add a new Form]. When adding field 1010051, fldtype(f05) select [select], link_fldid(f06) select ID, link_fldval(f07) select post_title.

7) Now you may add this 2 pages created in step 3) and 5) by refering to tutorial [Add a new Pages].

8) You may key-in a few data into table 1010050 before we creating the analysis table.

9) Now lets create the analysis table by repeating step 6). Create a new form 1010060, naming it as traffic analysis.
At the oderby(f06) key in [GROUP BY `f02`ORDER BY `f02` DESC]. Key in SUM at countsum(f18) for record 1010053 traffic.

10) Now lets create the pagesby repeating step 7).

Analysis table successfully created.