This topic is locked

Help on Search

5/12/2011 4:44:00 AM
PHPRunner General questions
S
swanside author

I have this sql in my project, Now, I build my project and run it.

I go to Advanced Search and in Customer Name I enter Mr Jones and it pops up Mr Jones. Upon pressing search I get all the jobs for Mr Jones.
Mr Jones has a CustomerId of 1123.
If I go to my job_list page and in the search box I enter Mr Jones, nothing comes up. But if I enter 1123, all the jobs for Mr jones appear.
Where am I going wrong with this?

I have attached two pictures of my search settings.

SELECT

Order_Date,

AttendBy,

End_Date,

File_No,

Job_No,

CustomerId,

CustomerId AS Customer_Name,

CustomerId AS customerPK,

CustomerId AS CustomerEmail,

Order_Time,

Contract,

Job_Description,

VAT,

Invoice_Printed,

Invoice_Printing_Date,

Invoice_Tax_Date,

Payment_Received,

Job_Finished,

CustomerRef,

Payment_Due_date,

Payment_Date,

Date_Added,

EngineerId,

EngineerId AS PDAAllocation,

EngineerId AS CRB_No,

LocationId,

LocationId AS Order_Site_Address,

LocationId AS locationPK,

LocationId AS Post_Code,

LocationId AS Line1,

LocationId AS DoorCode,

LocationId AS GateCode,

LocationId AS AlarmCode,

LocationId AS ExtraCode,

JobTypeId,

JobTypeId AS Job_Sheet,

Exported,

Logged_By,

PhoneNumber,

ResponseCatagories,

CallerName,

CONCATWS('',CustomerId,LocationId) AS ListPK,

Note

FROM job

ORDER BY Job_No DESC




Sergey Kornilov admin 5/12/2011

Here is the aticle that explains how to search on fields from joined tables:

http://xlinesoft.com/articles/search_sort_lookup_values.htm