Announcement

Collapse
No announcement yet.

Some Help with update another table

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Some Help with update another table

    I need some help again pls

    // SQL statement parameters
    $sum_points = "SELECT
    sum(result_answer_points)
    FROM results_answers
    WHERE resultid = '{resultid}'";
    sc_exec_sql($sum_points);

    $update_table = 'results';
    $update_where = "resultid = '{resultid}'";
    $update_fields = array(
    "result_points = ", (Here I need to update de $sum_points but I don't know how to do it)
    );

    // Update record
    $update_sql = 'UPDATE ' . $update_table
    . ' SET ' . implode(', ', $update_fields)
    . ' WHERE ' . $update_where;
    sc_exec_sql($update_sql);

  • #2
    To make it simple: $updatesql="update results set result_points=$mypoints where resultid='{resultid}'";
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Thank you Albert

      Comment

      Working...
      X