OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



[solved] ORDER BY ASC LIMIT 0,25 Bug2

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

[solved] ORDER BY ASC LIMIT 0,25 Bug2

Postby ponsfrilus » Fri Apr 30, 2010 12:07 am

Code: Select all
DB Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC LIMIT 0,25' at line 6


When trying to look up for an user in registration (/manager/registration)

Change ligne 687 of ocs23/classes/registration/RegistrationDAO.inc.php from
Code: Select all
    case 'user': return 'u.last_name';
to
Code: Select all
    case 'id':
    case 'user':
      return 'u.last_name';
Last edited by ponsfrilus on Fri Apr 30, 2010 9:30 am, edited 1 time in total.
ponsfrilus
 
Posts: 44
Joined: Fri Jun 05, 2009 7:46 am
Location: Switzerland

Re: ORDER BY ASC LIMIT 0,25 Bug2

Postby ponsfrilus » Fri Apr 30, 2010 12:18 am

ponsfrilus
 
Posts: 44
Joined: Fri Jun 05, 2009 7:46 am
Location: Switzerland

Re: ORDER BY ASC LIMIT 0,25 Bug2

Postby ponsfrilus » Fri Apr 30, 2010 12:29 am

Or change it to:
Code: Select all
    case 'id': return 'u.user_id';

if you want to sort them in the ID order....
ponsfrilus
 
Posts: 44
Joined: Fri Jun 05, 2009 7:46 am
Location: Switzerland

Re: ORDER BY ASC LIMIT 0,25 Bug2

Postby ponsfrilus » Fri Apr 30, 2010 9:30 am

Code: Select all
--- a/classes/registration/RegistrationDAO.inc.php
+++ b/classes/registration/RegistrationDAO.inc.php
@@ -687,6 +687,7 @@
          case 'type': return 'r.type_id';
          case 'registered': return 'r.date_registered';
          case 'paid': return 'r.date_paid';
+         case 'id': return 'r.registration_id';
          default: return null;
       }
    }


Thanks for the patch!
ponsfrilus
 
Posts: 44
Joined: Fri Jun 05, 2009 7:46 am
Location: Switzerland


Return to OCS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests