SET SQL_BIG_SELECTS=1

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • paul@is-d.co.uk

    #1

    SET SQL_BIG_SELECTS=1

    Hi Everyone

    I've had a database query page running on a site for a few months:
    (http://www.learningdirectory.info/search.php) with no problems.

    The search page contains the following query:

    SELECT CourseID, tblCourseInfo.P roviderID, tblCourseInfo.O ccupationID,
    tblCourseInfo.A uthorityID, tblOccupations. Occupation,
    tblOccupations. OccupationID, tblProviders.Pr oviderID,
    tblProviders.Pr ovName, tblAuthorities. AuthorityID,
    tblAuthorities. Authority
    FROM tblCourseInfo, tblOccupations, tblProviders, tblAuthorities
    WHERE tblCourseInfo.P roviderID LIKE 'varProvider'
    AND tblCourseInfo.O ccupationID LIKE 'varOccupation'
    AND tblCourseInfo.A uthorityID LIKE 'varAuthority'
    AND tblCourseInfo.O ccupationID LIKE tblOccupations. OccupationID
    AND tblCourseInfo.P roviderID LIKE tblProviders.Pr oviderID
    AND tblCourseInfo.A uthorityID LIKE tblAuthorities. AuthorityID
    ORDER BY tblOccupations. Occupation, tblProviders.Pr ovName,
    tblAuthorities. Authority

    But in the last few days a message has appeared:
    'The SELECT would examine more rows than MAX_JOIN_SIZE. Check your
    WHERE and use SET SQL_BIG_SELECTS =1 or SET SQL_MAX_JOIN_SI ZE=# if the
    SELECT is ok'

    I understand that I need to add ''SET SQL_BIG_SELECTS =1' but could
    someone please tell me where or how I add it? I haven't got a clue!!

    Many thanks
    Suffrinmick

Working...