Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

tep_db_insert_id problems - desperate for assistance


cleve

Recommended Posts

Posted

Hi,

I'm (unfortunately) managing a legacy system on behalf of a client.

 

It's running:

osCommerce 2.2-MS2

PHP Version 5.2.4

MySQL 5.0.67-community

 

Recently I patched it adding the SEO URLs plugin, tested it in my staging environment and all was good, but going live it's now broken, giving the following error when trying to create an account:

 

0 -

 

insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('0', '0', now())

 

 

The up shot of the problem is that tep_db_insert_id is returning zero. I've read extensively on Google about this and can confirm the following:

 

* database is set up correctly

* primary keys are set

* auto-increment is set

 

I've also tried a whole bunch of hacks including trying to add $$link, global $$link etc, but all of these result in the following error:

Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /home/ehouse/public_html/buylawnbowls.com/includes/functions/database.php on line 116

 

 

The only way i can think to fix it is to create a routine to manually retrieve the ID of the recently inserted record, I would have to do this by hand in around 20 different places so not an ideal solution.

 

I'm tearing my hair out, does anybody know the answer?

 

Looking forward to any responses,

Jase.

Posted

I can't speak for all of the SEO URLs contributions but Ultimate SEO V 2.2d doesn't have anything to do with that. The others shouldn't either so I suspect you made some other mistake and the url code changes is confusing you. I suggest restoring your code to where it was when it was working and try again.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Archived

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

×
×
  • Create New...