Errors after Upgrade

Errors after Upgrade

1 post / 0 new
steveboard@hotmail.com's picture
steveboard
Points: 0
Errors after Upgrade

This is my first post, so I apologize in advance if I am in the wrong forum. Here's my situation. I have just upgraded Drupal from 6.2.? to 7.28. However, I am not getting an error with the tablesort_sql function as indicated by this link: http://reddoorgallery.org/gallery-artists

I have not used Drupal before, so this is all new to me. I have done some googling on the particular error and it appears to be that tablesort_sql is no longer a valid command in Drupal 7. I've tried to google some workarounds, but my PHP coding is suspect at best. Here is what the original code for this page is:

Click on any artist's name to view their full profile.

 

<?php
$rid
= 3;
$header = array(
  array(
'data' => t('Username'), 'field' => 'u.name', 'sort' => 'asc')
);
?>

<?php
$sql
= "SELECT u.uid, u.name FROM {users} u INNER JOIN {users_roles} ur ON u.uid=ur.uid WHERE ur.rid = $rid";
$sql .= tablesort_sql($header);
$result = pager_query($sql, 50);

while (
$account = db_fetch_object($result)) {
  
$account = user_load(array('uid' => $account->uid));
  
$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
   if(
$account->picture){$account->picture = '<img src="/'.$account->picture.'" height="50" width="50" border="0" alt="'.$account->profile_realname.'">';}
     else{
$account->picture = '<img src="/images/no_photo.jpg" height="50" width="50" border="0" alt="no photo available">';}
?>
<?php
echo ($even_odd);
?>
">

<?php
}
?>
  Artist Name Media Location
<?php
echo ($account->uid);
?>
">
<?php
echo ($account->picture);
?>
<?php
echo ($account->uid);
?>
">
<?php
echo ($account->profile_realname);
?>
<?php
echo ($account->profile_media_list);
?>
<?php
echo ($account->profile_location);
?>

So, what can I change this to to make it work with Drupal 7.28? Your help would be greatly appreciated by everyone involved in this. Thank you in advance.

Status: 
Unresolved