ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Error Number: 1064 when using {exp:search:search_results} {paginate}

November 04, 2011 4:06pm

Subscribe [2]
  • #1 / Nov 04, 2011 4:06pm

    Amy Andrews

    28 posts

    Hi,
    I am getting Error Number: 1064 when I try to click on the next pagination link. Here is my code:

    {exp:search:search_results}
    
              {if channel_id == 14}{!-- Resources Page --}
               <div class="search_result a_closer_look">
               <h3><a href="http://{cc_resources_link_url}" target="_blank" rel="noopener">{title}</a></h3>
    <p>           {exp:trunchtml chars="150" inline="..." ending=" <a href='{url_title_path=consumer_corner/a_closer_look}'>read more.</a>"}<br />
               {exp:strip_html}<br />
               {cc_resources_content}<br />
               {/exp:strip_html}<br />
               {/exp:trunchtml}<br />
               </div>         <br />
              {/if}<br />
    {/exp:search:search_results}</p>
    
    <p>         {if paginate}<br />
                     <div class='paginate'><br />
                             <span class='pagecount'>{page_count}</span>  {paginate}<br />
                     </div><br />
             {/if}<br />
             <br />
             You searched for <strong>{exp:search:keywords}</strong> <br />
             and got {exp:search:total_results}{total_results}{/exp:search:total_results} result{if "{exp:search:total_results}" != 1}s{/if}.<br />
            </div>

    Here is the error I am getting:

    Error
    
    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 ‘P50, 50’ at line 11
    
    SELECT DISTINCT(t.entry_id), t.entry_id, t.channel_id, t.forum_topic_id, t.author_id, t.ip_address, t.title, t.url_title, t.status, t.dst_enabled, t.view_count_one, t.view_count_two, t.view_count_three, t.view_count_four, t.allow_comments, t.comment_expiration_date, t.sticky, t.entry_date, t.year, t.month, t.day, t.entry_date, t.edit_date, t.expiration_date, t.recent_comment_date, t.comment_total, t.site_id as entry_site_id,
        w.channel_title, w.channel_name, w.search_results_url, w.search_excerpt, w.channel_url, w.comment_url, w.comment_moderate, w.channel_html_formatting, w.channel_allow_img_urls, w.channel_auto_link_urls, 
        m.username, m.email, m.url, m.screen_name, m.location, m.occupation, m.interests, m.aol_im, m.yahoo_im, m.msn_im, m.icq, m.signature, m.sig_img_filename, m.sig_img_width, m.sig_img_height, m.avatar_filename, m.avatar_width, m.avatar_height, m.photo_filename, m.photo_width, m.photo_height, m.group_id, m.member_id, m.bday_d, m.bday_m, m.bday_y, m.bio,
        md.*,
        wd.*
      FROM exp_channel_titles AS t
      LEFT JOIN exp_channels   AS w ON t.channel_id = w.channel_id 
      LEFT JOIN exp_channel_data AS wd ON t.entry_id = wd.entry_id 
      LEFT JOIN exp_members AS m ON m.member_id = t.author_id 
      LEFT JOIN exp_member_data AS md ON md.member_id = m.member_id 
      WHERE t.entry_id IN (6310,4248,5651,5770,6019,5047,5031,4604,4602,4595,4596,4593,4589,4580,4581,4585,4587,4588,4578,4573,4574,4568,4570,4572,4566,4564,4565,4555,4553,4543,4544,4348,4350,4354,4355,4356,4357,4358,4362,4363,4364,4374,4375,4378,4379,4383,4385,4387,4388,4392,4397,4400,4405,4409,4412,4421,4423,4429,4431,4433,4436,4437,4441,4443,4450,4451,4457,4462,4464,4478,4481,4483,4484,4485,4486,4487,4489,4492,4495,4496,4499,4500,4501,4504,4506,4509,4511,4512,4513,4514,4517,4518,4519,4522,4523,4524,4525,4526,4529,4530,4538,4539,4540,4541,4342,4343,4340,4337,4335,4336,4330,4331,4326,4325,4324,4322,4321,4318,4319,4315,4312,4308,4307,4302,4301,4299,4297,4294,4295,4296,4290,4291,4288,4287,4286,4285,4283,4284,4281,4278,4277,4275,4273,4269,4268,4264,4261,4260,4258,4257,4256,4255,4253,4252,4250,5439,5400,5361,4247,4245,4244,4242,4241,4239,4240,4230,4228,4220,4221,4222,4226,4186,4187,4188,4192,4199,4200,4201,4202,4203,4204,4206,4209,4211,4213,4216,4218,4184,4181,4180,4179,4176,4177,4175,4172,4170,4169,4168,4167,4166,3824,3825,4637,4647,4818,6585,6625,6643,6723,6777,6813,6969,6993,7104,7123,7159,7347,7427,7771,7769,7801,7825,7914,7931,7957,8048,8074,60,6412,6337,6068,6174,5491,5647,5930,5713,6038,5984,4882,5113,5018,5200,2028,2029,2031,2032,2033,2034,2035,2036,2037,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2070,2071,2072,2073,2074,2075,2076,2077,2078,2139,2150,2152,2154,2155,2156,2157,2160,2161,2164,2172,2174,2175,2181,2186,2187,2191,2196,2197,2199,2200,2201,2202,2203,2204,2210,2212,2217,2218,2219,2223,2225,2226,2229,2234,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2253,2256,2257,2258,2259,2260,2261,2262,2263,2264,2266,2267,2269,6246,5459,4973,5356,5414,4626,4608,4685,4726,4860,4835,5833,6470,6550,6742,6791,6880,6991,7049,7272,7412,7513,7573,7743,7799,7851,7930,8014,8061,8099,6309,5537,5513,5650,5595,5767,5752,6018,5074,5032,5438,5399,5360,4643,4770,4819,6451,6496,6586,6623,6641,6715,6811,6970,6992,7031,7092,7106,7344,7426,7469,7495,7772,7783,7812,7820,7911,7929,7955,8046,8068,8106)  ORDER BY entry_date desc LIMIT P50, 50

    The url for this error is:
    http://healthnewsflorida.org/search/results/a55c12b590c31467c1fc087702132715/P50

    After I search for a term ‘carol gentry’ and click on the first pagination link it goes to the url above where I get the error

    Thanks,
    Amy

  • #2 / Nov 04, 2011 4:14pm

    Amy Andrews

    28 posts

    Sorry, we figured out that this is a issue because we need to upgrade to the latest version of EE. You can close this thread, sorry about that!

  • #3 / Nov 07, 2011 8:34am

    Sue Crocker

    26054 posts

    Hi, Amy .. Glad you were able to figure out what the problem was. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases