Hey guys. I'm working on a database with 3 tables, some with overlapping information. A few columns from each table can be updated by the user via the web app that I am creating. But... There is an issue. Not sure what it is, but my updates aren't happening. I am wondering if something is wrong with my query. (Actually, after debugging, I am quite certain there is).
Sorry if it is trivial; I have never worked with multiple tables before.
Thanks very much for any/all suggestions
-N
Code:
if (empty($errors)) { $query1 = "UPDATE owner SET name = '{$name}' WHERE ownerId= '{$ownerId}'"; $query1_result = mysql_query($query1); if (mysql_affected_rows()==1) { $query3 = "UPDATE queue_acl SET date_expires = '{$date_expires}' WHERE user_id='{$ownerId}'"; $query3_result = mysql_query($query3); if (mysql_affected_rows()==1) { $query2 = "UPDATE ownerOrganization SET orgId = {$orgId} WHERE ownerId = '{$ownerId}'"; $query2_result = mysql_query($query2); if (mysql_affected_rows()==1) { $_SESSION['name'] = $name; $_SESSION['updates_occurred'] = true; } } }
Thanks very much for any/all suggestions
-N
Comment