This topic is locked

Search

6/1/2011 3:03:19 AM
PHPRunner General questions
bbarker author

When I search my Master table by Last Name, I'd like it to SORT by First Name.

(I'm using the built-in search box.)
Is this an EVENT modification?
If so, what do I enter in order to modify the results?

L
Lena 6/1/2011

Hi,

you can use following code in List page: Before SQL query:



if (isset($_GET["field1"]) && ($_GET["field1"]=="LastName")){

$strOrderBy = "ORDER BY FirstName DESC";

}



where LastName and FirstName are the actual field names in your table.

bbarker author 6/2/2011



use following code in List page: Before SQL query:



if (isset($_GET["field1"]) && ($_GET["field1"]=="LastName")){

$strOrderBy = "ORDER BY FirstName DESC";

}



That didn't seem to do it. I'll save a copy in DEMO.