Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,892
    Plugin Contributions
    96

    Default Re: PHP Fatal error: 1064

    Check your PMs

  2. #12
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,892
    Plugin Contributions
    96

    Default Re: PHP Fatal error: 1064

    I tried entering the SQL query directly into my localhost testbed's phpMyAdmin
    Code:
    SELECT categories_id FROM categories WHERE categories_id='-1';
    which returned an empty result, not an error. Good old line 169
    Code:
      $check_category = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_id='" . $cPath . "'");
    appears, to my eyes, to be providing the correct formatting.

    There's something else going on, but I'm not sure what ... yet.

  3. #13
    Join Date
    Aug 2004
    Location
    Newport, Wales
    Posts
    283
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1064

    I'm not entirely with you on this as my php skills are definitely little league.

    I assumed that the coding is OK and that either CEOn or something I added was causing the issue - but lost as to how to determine what exactly

  4. #14
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,892
    Plugin Contributions
    96

    Default Re: PHP Fatal error: 1064

    Sorry to be obtuse. Your issue is a puzzler because (1) using a properly-formatted SQL query with a categories_id of -1 (and single-quotes around the value) do not cause errors when issued directly and (2) the formatting provided by your copy of the .php file (to my eyes) looks proper.

    One thing that you could try, for grins and giggles, is to make the following (temporary) change to line 169 in tpl_index_product_list.php:
    Code:
      $the_query = "select categories_id from " . TABLE_CATEGORIES . " where categories_id='" . $cPath . "'";
     error_log (__FILE__ . ': ' . $the_query);
     $check_category = $db->Execute($the_query);
    Replace that single line with the three above, repeat the transaction that failed, restore the code to the single-line version and then look to see what the debug-log files have to say. The error_log statement will output the failing query as part of the log's record.

  5. #15
    Join Date
    Aug 2004
    Location
    Newport, Wales
    Posts
    283
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1064

    Hi Lat9

    Thanks for the reply .... all very mysterious.

    I will quite happily amend the code as you suggested,however the problem I have is that I don't know what triggers the error. You mentioned a failed transaction, so I assume you think it is happening when adding to cart?

    Cheers
    Brinley

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. inscrutable PHP Error 1064 install failure
    By cyberbaffled in forum Installing on a Linux/Unix Server
    Replies: 9
    Last Post: 21 Mar 2015, 05:16 PM
  2. v151 PHP Fatal error: 1064:You have an error in your SQL syntax
    By chaptech in forum General Questions
    Replies: 2
    Last Post: 5 Mar 2015, 07:16 PM
  3. PHP Fatal error: 1064:You have an error in your SQL syntax
    By uswebworx in forum General Questions
    Replies: 11
    Last Post: 19 Apr 2012, 09:17 AM
  4. 1064 sql error from mod in split_page_results.php ?
    By bonnit in forum Basic Configuration
    Replies: 2
    Last Post: 9 Aug 2011, 05:13 PM
  5. Fatal error: mysql error (1064 error) -- v1.0-alpha
    By Dale Schibbelhut in forum General Questions
    Replies: 9
    Last Post: 18 Nov 2010, 08:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg