This topic is locked

sort broken after moving some fields

9/19/2007 11:58:02 AM
PHPRunner General questions
M
mrpeeble author

I moved the location of GivenName and Surname manually by editing the _list.htm file. Everything looks good and works fine except the sort order. When I now click the GivenName column header in the list page it sorts the Surname, when I click the column header Surname it sorts by the GivenName.

I have looked thru the _list.php _events.php , _variables.php, and the _list.htm and I cannot figure out how to correct this.
Any help would be appreciated.

Alexey admin 9/20/2007

Hi,
inspect your links in HTML mode:

The code should look like this:

<A class=blackshade href="Cars_list.php?orderby={$orderdirGivenName}GivenName">Surname</A>


Change GivenNameto Surnamehere and vice versa in another link.

M
mrpeeble author 9/20/2007

Hi,

inspect your links in HTML mode:

The code should look like this:
Change GivenNameto Surnamehere and vice versa in another link.


Alexey,
The code does not appear as you predict. The code looks like this in the _list.htm page:
<td><table><tr><td class=blackshade>

<a class="blackshade"

href="fr_payment_list.php?orderby={$order_dir_Surname}Surname">

Surname</a>

</td>

<td>{$order_image_Surname}</td>

</table>

</td>
<td><table><tr><td class=blackshade>

<a class="blackshade"

href="fr_payment_list.php?orderby={$order_dir_GivenName}GivenName">

Given Name</a>

</td>

<td>{$order_image_GivenName}</td>

</table>

</td>
further down the page the only other change I made was the order of fields which now looks like this:
<td>

{$row.1Surname_value}

</td>

<td>

{$row.1GivenName_value}

</td>

<td>
When I click Surname it sorts by the GivenName column and vice versa.

Alexey admin 9/20/2007

Please publish your project on Demo account and send a link to it to support@xlinesoft.com

M
mrpeeble author 9/24/2007

Please publish your project on Demo account and send a link to it to support@xlinesoft.com


problem resolved by support:
To get your pages working without rebuild modify SQL query in

> include/fr_payment_variables.php file.

> Change this line:

> ----------------------------------------------------------------

> $gstrSQL = "select `ID`, `Surname`, `GivenName`, ...

> ----------------------------------------------------------------

> this way:

> ----------------------------------------------------------------

> $gstrSQL = "select `ID`, `GivenName`, `Surname` , ...

> ----------------------------------------------------------------
This fixed it nicely, so simple!