0

I am working on the simple function which update the value in database, I am strange that when I add more than 1 where clause, the query didnot work.

I have worked on it over 6 hours already. Please help

the first query work:

 tep_db_perform(TABLE_CUSTOMERS_EDUCATIONS, $sql_data_array, 'update', "customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");

This query did not work:

 tep_db_perform(TABLE_CUSTOMERS_EDUCATIONS, $sql_data_array, 'update', "customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'" . " and seq_no = '" . (int)$education_seq . "'");

Seems there are not much discussion on this silly problem, but unluckily I am facing on this. I know this may be a simple question but I am very new in php so please help me. Thanks....

user3423149
  • 159
  • 1
  • 1
  • 16

1 Answers1

3

Try below code.

your $sql_data_array should be correct.

$sql_data_array = array('customers_id' => (int)$HTTP_GET_VARS['cID'],
                        'seq_no' => (int)$education_seq
                        );

tep_db_perform(TABLE_CUSTOMERS_EDUCATIONS, $sql_data_array, 'update', "customers_id = '" . (int)$HTTP_GET_VARS['cID'] ."' and seq_no = '" . (int)$education_seq . "'");
Jayson
  • 1,105
  • 7
  • 25
  • if my answer is working for you then mark it as correct to help other people facing same issue. glad to help. – Jayson Apr 23 '15 at 04:19