Jump to content

php page taking time to load a register


jkkenzie

Recommended Posts

hi! i dont know if the query below from mysql is slowing down the page or i have not written it properly:

It is very slow, even when you limit the results to 100 . Thanks in advance..

SELECT  `tbl_business`.`appformno`, " _
            & "`tbl_business`.`pobox`, `tbl_business`.`plotno`, `tbl_business`.`postalcode`, " _
            & "`tbl_business`.`zonecode`, `tbl_business`.`ne`, `tbl_activities`.`act_code`, " _
            & "`tbl_activity_codes`.`approved_fee`, `tbl_payment_status`.`status`, " _
            & "`tbl_business`.`company`, `tbl_activity_codes`.`description` " _
            & "FROM (`citycouncil`.`tbl_activity_codes` `tbl_activity_codes` " _
            & "LEFT JOIN (`citycouncil`.`tbl_business` `tbl_business` " _
            & "LEFT JOIN `citycouncil`.`tbl_activities` `tbl_activities` " _
            & "ON `tbl_business`.`appformno`=`tbl_activities`.`appformno`) " _
            & "ON `tbl_activity_codes`.`act_code`=`tbl_activities`.`act_code`) " _
            & "LEFT JOIN `citycouncil`.`tbl_payment_status` `tbl_payment_status` " _
            & "ON `tbl_activities`.`id`=`tbl_payment_status`.`activity_id` " _
            & "WHERE tbl_business.appformno LIKE '%" & strFormNo & "%' " _
            & "AND tbl_business.bid LIKE '%" & strBizIdNo & "%'" _
            & " AND `tbl_business`.`contperson` LIKE '%" & strContPerson & "%' " _
            & "AND `tbl_business`.`zonecode` LIKE '%" & strZoneCode & "%' " _
            & " AND `tbl_activities`.`act_code` LIKE '%" & strBizActCode & "%' " _
            & "AND `tbl_business`.`roadstreet` LIKE '%" & strStreet & "%' " _
            & " AND `tbl_business`.`company` LIKE '%" & strBizName & "%' " _
            & "AND `tbl_business`.`building` LIKE '%" & strBuilding & "%' " _
            & "ORDER BY `tbl_business`.`appformno`

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.