Skip to main content
September 23, 2009
Question

Dynamic drop down menu/list help

  • September 23, 2009
  • 1 reply
  • 434 views

i can query the list fine using:

select list.list, many_table.list_id_fk from list left join many_table
on list.id = many_table.list_id_fk and many_table.userid = 'UserId';

that populates the list per user id.

now when the user selects a new item from the list
it does not update

here is the update query:

$updateSQL = sprintf("UPDATE list_many SET list_many_id_fk=%s, UserIdFk=%s, `Date`=%s WHERE Id=%s",
GetSQLValueString($_POST['list_many_idfk'], "int"),
GetSQLValueString($_POST['UserIdFk'], "int"),
GetSQLValueString($_POST['Date'], "date"),
GetSQLValueString($_POST['Id'], "int"))


thanks in advance for your help!

theo werntz ii

This topic has been closed for replies.

1 reply

September 24, 2009

this has been resolved! i needed to limit what the form was updating, just the list fk id and date that the new update was entered.

$updateSQL = sprintf("update ASBodyType as a
           left join BSType as b
  on b.Id = a.BodyType
  set a.BodyType=%s, a.Date=now()
          where a.UIdFk='1'",
           GetSQLValueString($_POST['BodyType'], "int"));


thanks again for your help!