Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1064 - You have an error in your SQL syntax


Simplyeasier

Recommended Posts

Hi everyone,

 

I'm having this error only with one page checkout when a returning customer logs in and tries to buy something.

 

 

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 'where customer_id = '3'' at line 1

 

select amount from where customer_id = '3'

 

 

Sorry to double post but I haven't seen anyone with this exact problem anywhere and it appears to be some database issue outside the scope of that forum. I'm using mySQL 5.1.30 and the split page results fix at the beginning of this forum has already been applied. I triple checked the installation of one page checkout I did. Could this be some strange conflict with purchase without account even though they're supposed to work together? Any ideas would be much appreciated.

 

Thanks,

 

Nick

 

 

http://www.oscommerce.com/forums/topic/333292-one-page-checkout-support/page__st__1100__gopid__1476227entry1476227

 

 

got a solution to my problem...no database problem...just some extra junk code gumming things up.

Link to comment
Share on other sites

  • 2 months later...
  • Replies 354
  • Created
  • Last Reply

Hi, my 1064 error is a little different.

 

This is on the catalog side on page one of one of my categories. The rest of the pages seem fine.

 

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 '' at line 1<br><br>select filter from products where products_id = ;<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>

 

 

Can anyone help figure out what this is about? Thanks.

Link to comment
Share on other sites

  • 4 weeks later...

I'm having an interesting error happening on catalog/shopping_cart.php in the block of code below.

 

This is happening only on products with attributes and it happens regardless of which attribute is chosen.

 

The error is:

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 '{1}7' at line 1

 

SELECT products_master FROM products WHERE products_id = 128{1}7

 

[TEP STOP]

 

 

The query code is:

// Master Products     
   $master_prod = tep_db_query("select products_master, products_master_status from " . TABLE_PRODUCTS . " where products_id = '" . $products[$i]['id'] . "'");
   $master_prod_values = tep_db_fetch_array($master_prod);

   if (($master_prod_values['products_master_status'] == 0) && ($master_prod_values['products_master'] != 0)) {
     $prod_link_id = $master_prod_values['products_master'];
   } else { $prod_link_id = $products[$i]['id']; }
    $products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
                     '  <tr>' .
                     '    <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $prod_link_id) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
                     '    <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';
//Master Products EOF

 

I did try changing

where products_id = '" . $products[$i]['id'] . "'

to

where products_id = '" . (int)$products[$i]['id'] . "'

but it did not make a difference.

 

I also tried the suggestion at the beginning of this forum to change admin/includes/classes/split_page_results.php by adding this blurb

if ($offset < 0)
      {
      $offset = 0 ;
      }

 

again - this didn't do anything for my issue.

 

Anyone have any ideas how to fix this? I've been searching the forums and haven't found this particular error anywhere else yet. Thanks in advance for any ideas :)

~Tracy
 

Link to comment
Share on other sites

I would start with a file comparison tool (like WinMerge) and compare your catalog/index.php file with the stock osC catalog/index.php file.

 

Hi, my 1064 error is a little different.

 

This is on the catalog side on page one of one of my categories. The rest of the pages seem fine.

 

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 '' at line 1<br><br>select filter from products where products_id = ;<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>

 

 

Can anyone help figure out what this is about? Thanks.

~Tracy
 

Link to comment
Share on other sites

I've learned the issue may lie in includes/application_top.php in this bit of code, but I'm not strong enough in PHP or MySQL to determine what bit of code is suddenly generating a 1064 error :blush:

 

// customer adds a product from the products page
     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+ $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']);
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
    //Master Products
    // customer adds multiple products from the master_listing page
     case 'add_slave' :
                             reset($HTTP_POST_VARS);
                             while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) {
                               if (substr($key,0,11) == "Qty_ProdId_") {
                                 $prodId = substr($key,11);
                                 $qty = $val;
							  // if zero: go to the next HTTP_POST_VARS on next line
							  if ($qty <= 0) continue;
                                 if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) {
                                   // We have attributes
                                   $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]);
                                 } else {
                                   // No attributes
                                   $cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);
                                 }
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
    //Master Products EOF
     // performed by the 'buy now' button in product listings and review page
     case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
     case 'notify' :         if (tep_session_is_registered('customer_id')) {
                               if (isset($HTTP_GET_VARS['products_id'])) {
                                 $notify = $HTTP_GET_VARS['products_id'];
                               } elseif (isset($HTTP_GET_VARS['notify'])) {
                                 $notify = $HTTP_GET_VARS['notify'];
                               } elseif (isset($HTTP_POST_VARS['notify'])) {
                                 $notify = $HTTP_POST_VARS['notify'];
                               } else {
                                 tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
                               }
                               if (!is_array($notify)) $notify = array($notify);
                               for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
                                 $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'");
                                 $check = tep_db_fetch_array($check_query);
         // BOF SPPC, Hide products and categories from groups
         if (is_array($hide_status_products) && tep_not_null($hide_status_products)) {
         	foreach($hide_status_products as $key => $subarray) {
         		if ($subarray['products_id'] == tep_get_prid($notify[$i]) && $subarray['hidden'] == '0') {
                                 if ($check['count'] < 1) {
                                   tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");
                                 }
                               } // end if ($subarray['products_id'] == tep_get_prid($notify[$i])...
                           } // end foreach ($hide_status_products as $key => $subarray)
                       } else {
                       	if ($check['count'] < 1) {
                       		tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");
                       	}
                   }
               // EOF SPPC, Hide products and categories from groups
                             }

                               tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
                             } else {
                               $navigation->set_snapshot();
                               tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
                             }
                             break;
     case 'notify_remove' :  if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {
                               $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                               $check = tep_db_fetch_array($check_query);
                               if ($check['count'] > 0) {
                                 tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                               }
                               tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));
                             } else {
                               $navigation->set_snapshot();
                               tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
                             }
                             break;
     case 'cust_order' :     if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
   } // end switch
// BOF Separate Pricing Per Customer v4.1, Hide products from groups mod
   } else { // $hide_product is true
      tep_redirect(tep_href_link(FILENAME_DEFAULT));
 }
// EOF Separate Pricing Per Customer v4.1, Hide products from groups mod
} // if (isset($HTTP_GET_VARS['action']))

 

Does anything in there look to you like it would be the culprit?

 

I'm having an interesting error happening on catalog/shopping_cart.php in the block of code below.

 

This is happening only on products with attributes and it happens regardless of which attribute is chosen.

 

The error is:

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 '{1}7' at line 1

 

SELECT products_master FROM products WHERE products_id = 128{1}7

 

[TEP STOP]

~Tracy
 

Link to comment
Share on other sites

Anybody? I still have no idea why this isn't working, and it does have our top selling product unable to be ordered through the site right now :( Any thoughts on what bit of code is incorrect with MySQL 5.0.89 would be greatly appreciated.

 

You can see this in action at mountainmeadowherbs.com/gentle-birth-formula-p-31.html - try adding it to the cart and you'll see the error.

 

I've learned the issue may lie in includes/application_top.php in this bit of code, but I'm not strong enough in PHP or MySQL to determine what bit of code is suddenly generating a 1064 error :blush:

 

// customer adds a product from the products page
     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+ $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']);
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
    //Master Products
    // customer adds multiple products from the master_listing page
     case 'add_slave' :
                             reset($HTTP_POST_VARS);
                             while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) {
                               if (substr($key,0,11) == "Qty_ProdId_") {
                                 $prodId = substr($key,11);
                                 $qty = $val;
							  // if zero: go to the next HTTP_POST_VARS on next line
							  if ($qty <= 0) continue;
                                 if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) {
                                   // We have attributes
                                   $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]);
                                 } else {
                                   // No attributes
                                   $cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);
                                 }
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
    //Master Products EOF
     // performed by the 'buy now' button in product listings and review page
     case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
     case 'notify' :         if (tep_session_is_registered('customer_id')) {
                               if (isset($HTTP_GET_VARS['products_id'])) {
                                 $notify = $HTTP_GET_VARS['products_id'];
                               } elseif (isset($HTTP_GET_VARS['notify'])) {
                                 $notify = $HTTP_GET_VARS['notify'];
                               } elseif (isset($HTTP_POST_VARS['notify'])) {
                                 $notify = $HTTP_POST_VARS['notify'];
                               } else {
                                 tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
                               }
                               if (!is_array($notify)) $notify = array($notify);
                               for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
                                 $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'");
                                 $check = tep_db_fetch_array($check_query);
         // BOF SPPC, Hide products and categories from groups
         if (is_array($hide_status_products) && tep_not_null($hide_status_products)) {
         	foreach($hide_status_products as $key => $subarray) {
         		if ($subarray['products_id'] == tep_get_prid($notify[$i]) && $subarray['hidden'] == '0') {
                                 if ($check['count'] < 1) {
                                   tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");
                                 }
                               } // end if ($subarray['products_id'] == tep_get_prid($notify[$i])...
                           } // end foreach ($hide_status_products as $key => $subarray)
                       } else {
                       	if ($check['count'] < 1) {
                       		tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");
                       	}
                   }
               // EOF SPPC, Hide products and categories from groups
                             }

                               tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
                             } else {
                               $navigation->set_snapshot();
                               tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
                             }
                             break;
     case 'notify_remove' :  if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {
                               $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                               $check = tep_db_fetch_array($check_query);
                               if ($check['count'] > 0) {
                                 tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                               }
                               tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));
                             } else {
                               $navigation->set_snapshot();
                               tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
                             }
                             break;
     case 'cust_order' :     if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
   } // end switch
// BOF Separate Pricing Per Customer v4.1, Hide products from groups mod
   } else { // $hide_product is true
      tep_redirect(tep_href_link(FILENAME_DEFAULT));
 }
// EOF Separate Pricing Per Customer v4.1, Hide products from groups mod
} // if (isset($HTTP_GET_VARS['action']))

 

Does anything in there look to you like it would be the culprit?

~Tracy
 

Link to comment
Share on other sites

I did search the forums for the tep_get_uprid and that is what pointed me to the application_top section of code I posted - however, the only fixes I could find for that bit of code had already been applied or caused even more problems to the online store. That is why I then posted my application_top.php add_product, add_slave etc.. tidbits of code to see if anyone can tell what is wrong? Is that where the problem is in my situation? How do you "strip" the attributes from the product ID and still send them to the shopping cart?

 

I already gave you the answer to your problem.

 

You need to strip the attributes from the product ID.

 

I even gave you the right code to search the forum for.

~Tracy
 

Link to comment
Share on other sites

How do you "strip" the attributes from the product ID and still send them to the shopping cart?

By casting it to an integer is one (simplest) way. The query you mention is the same as one in modules/master_products.php but that one isn't used in the shopping cart and it already uses casting to an integer. In the shopping cart modules/product_listing.php is used though.

 

If you downloaded the source code of your shop most text editors (at least the ones I use and have used) allow you to search for a phrase in a directory and it's subdirectories. It should be simple to find the "SELECT product_master FROM".

Link to comment
Share on other sites

  • 2 weeks later...

Hi

 

First off - this fix is actually already recorded in the contributions section and many thanks to those who recorded it - but I don't think it is a contribution - rather a tip - Secondly the same problem has arisen for 4 people in a few days and I dare say it will happen to more as hosts migrate their mySQL databases to version 4.1.xx -

 

Hence I post here :D

 

If you get an error whilst creating \ modifying your database such that thro admin you delete all entries on a particular table you will likely get this message

 

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 '-20, 20' at line 1

 

followed by something like

 

select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from manufacturers order by manufacturers_name limit -20, 20

 

or

 

select banners_id, banners_title, banners_image, banners_group, status, expires_date, expires_impressions, date_status_change, date_scheduled, date_added from banners order by banners_title, banners_group limit -20, 20

 

depending on which table you have deleted all records from.

 

To fix this

 

In admin/includes/classes find split_page_results.php and - BACK IT UP then find the lines

 

$offset = ($max_rows_per_page * ($current_page_number - 1));
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

change to

 

$offset = ($max_rows_per_page * ($current_page_number - 1));
 if ($offset < 0)
{
$offset = 0;
}
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

 

MySQL 4.1.xx handles negatives correctly (by forcing an error) in the code above unlike earlier versions of MySQL.

 

:o NOTE - I have NOT asked you to change catalog/includes/classes/split_page_results.php - If you have a problem on the catalog side you may want to try the same change in that file - I did and it went wrong so the change to my catalog/includes/classes/split_page_results.php file is a little more elaborate and I will share that here if it becomes an issue - but for now it seems people will mostly have a problem with empty files on the admin side.

 

Change (catalog/includes/classes/split_page_results.php around line 67) from:

$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

to:

$this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;

 

Both on the catalog side and the admin side changing $offset to max($offset, 0) is the "official" fix.

 

hth

 

Charles

 

Hello All guys

 

thank you so much after 5 years. i had this problem in 2010 and the solution was in 2005 so thank u so much again Mr Simplyeasier

 

Regards

Link to comment
Share on other sites

Thanks Jan,

 

I found the offending query in the cross sell contribution code I have for the shopping cart page - it needed a single quote by the double quote and then it worked. YAY!

 

As for casting the product id to an integer - is that done by simply putting (int) in front of products_id so the query would have (int)products_id ?

 

By casting it to an integer is one (simplest) way. The query you mention is the same as one in modules/master_products.php but that one isn't used in the shopping cart and it already uses casting to an integer. In the shopping cart modules/product_listing.php is used though.

 

If you downloaded the source code of your shop most text editors (at least the ones I use and have used) allow you to search for a phrase in a directory and it's subdirectories. It should be simple to find the "SELECT product_master FROM".

~Tracy
 

Link to comment
Share on other sites

  • 2 weeks later...

Please Help

 

Hi im getting this error on the cataloge side of my website when i try to view the product details.

 

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 'from products p, products_description pd where p.products_status = '1' and p.pro' at line 1

 

select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_reviews_optional, from products p, products_description pd where p.products_status = '1' and p.products_id = '123' and pd.products_id = p.products_id and pd.language_id = '1'

 

[TEP STOP]

 

 

 

Thanks

Link to comment
Share on other sites

I have started making a new site/design

somehow while making it I have broken my original site which was working fine

Im not sure how I did it but...

 

 

It started with the 1064 - syntax error

which I part-corrected with the original post's fix

however I now have

 

Warning: Division by zero in /home/hosscom/public_html/catalog/includes/classes/split_page_results.php on line 59

Displaying 0 to 0 (of 4 products) Result Pages: -4 -3 -2 -1 0

 

appearing at the top of product listing pages

and i cant navigate to following pages of that designer

 

if i simply remove line 59

i can see the whole list of products but it is wrong

 

any ideas?

 

regards

Patrick

 

see error at

http://www.hoss.com.au/catalog/index.php?cPath=61

Link to comment
Share on other sites

ive had to delete line 59 just so I can display all products

but the site is messed up now

Admin >> Configuration >> Maximum Values

 

On that page be sure 'Search Results' is greater than ZERO

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

  • 2 months later...

Hey People. Can someone help me out, I am in desperate need. After Moving my hosting to a new server, which I believe is running newer MySQL versions, I get this error only when I am trying to access the admin page

 

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 'and g.admin_groups_id=' at line 1

 

select a.admin_id, a.admin_firstname, a.admin_lastname, a.admin_email_address, a.admin_created, a.admin_modified, a.admin_logdate, a.admin_lognum, g.admin_groups_name from admin a, admin_groups g where a.admin_id= and g.admin_groups_id=

 

[TEP STOP]

 

 

 

Can someone Please help me out. Thank you so much.

Link to comment
Share on other sites

  • 4 months later...

I have read, re-read this and many other posts and yet cannot get the problem fixed. my error only occurs when I try to duplicate a product from within the admin section, the error appears on the categories.php file

 

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 '0.06', '0', '0', '12')' at line 1

insert into products (products_quantity, products_model, products_image, products_image_medium, products_image_large, products_price, products_cost, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('2', 'HW2009048', 'HW2009048.JPG', '', '', '4.9900', '0.0000', ' now(), '', '0.06', '0', '0', '12')

[TEP STOP]

 

I would be most grateful if anyone could shed some light on this. Thanks

Link to comment
Share on other sites

Finally figured it out, I wqas missing a quotation mark after the now() statement.

 

 

............  ' now(), '', ............

 

should have been

 

............  ' now()', '', ............

Link to comment
Share on other sites

I have the same error in my site.

I've added a Member_Approval_v1.6 form HERE. The error shows up when I click "Activate" at the admin side at Customers-Waiting Aproval-"Client name".

 

Database: MySQL 5.0.51a-log

HTTP Server: Apache/1.3.41 (Unix) PHP/4.4.8 mod_ssl/2.8.31 OpenSSL/0.9.8g

PHP Version: 4.4.8 (Zend: 1.3.0)

 

PLEASE HELP!

 

See the attached screenshots!

 

capture1.jpg

capture2.jpg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...