• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Database Pull


Is there a way to avoid that? I would like to limit the return to just one set...

Thanks for all the help guys.

My post at 09:06 AM covers an alternative method.


I get this error when I try to use the code:

An Error Was Encountered

Error Number: 1064

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 'group ASC, id ASC LIMIT 3' at line 3

SELECT * FROM outreach_widget ORDER BY group ASC, id ASC LIMIT 3


This is valid SQL however you might consider wrapping your column names if you're going to use a column named "group" as this is part of the keyword "GROUP BY".


It seems to always order it by ID... even though it says random.


Sorry -- I'm not sure what you're doing.

"group" isn't even in the table you showed, and your SQL query asks for "id ASC".

Figured it all out. Thanks for the help!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.