Hi have to see the content of array as result of mySQL select. I did lot of test but no way… Which is the sintax I have to use ?
The query work perfectly and echo $$check_sql is nice.
$check_sql = “SELECT memberName, contactLastName,
borndate, bornplace, members.phone, members.mobile01, members.addressLine1,
members.city, members.postalCode, members.fiscalcode, license_card_01,
offices.officedesc, offices.code01, offices.city
FROM members LEFT OUTER JOIN offices ON members.officeID = offices.officeID
WHERE memberID = {event_member}”;
sc_select(dataset, $check_sql);
print_r(array_values(???));
I did also echo " 0 " . ‘{dataset[0][0]}’ . " 1 " . ‘{dataset[0][0]}’ …
After the array I have an UPDATE comand like following:
$update_table = ‘events_rows’; // Table name
$update_where = “event_row_ID = [glo_event_row_ID]”; // Where clause
$update_fields = array( // Field list, add as many as needed
"event_subscriber_surname
= ‘{dataset[0][1]}’",
"born_to
= ‘{dataset[0][3]}’ “,
"born_date
= ‘{dataset[0][2]}’”,
"city
= ‘{dataset[0][7]}’ ",
"zipcode
= ‘{dataset[0][8]}’ “,
"address
= ‘{dataset[0][6]}’ “,
"phone
= ‘{dataset[0][4]}’”,
"office
= ‘{dataset[0][11]}’”,
"office_code
= ‘{dataset[0][12]}’ ",
"office_city
= ‘{dataset[0][13]}’ ",
"license_nr
= ‘{dataset[0][10]}’ ",
"fiscal_code
= ‘{dataset[0][09]}’ ",
);
// Update record
$update_sql = ‘UPDATE ’ . $update_table
. ’ SET ’ . implode(’, ', $update_fields)
. ’ WHERE ’ . $update_where;
sc_exec_sql($update_sql);
Result is that SC write in all listed field the same content as the lenght of field:
“memberName,contactLastName,borndate,bornplace,phone,mobile01,add” … on each field.
??? Where is the mistake ??