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
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

[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: No registered users and 2 guests

cron