jay7981 Posted February 19, 2010 Share Posted February 19, 2010 Hey all, i have a multi table instert i am trying to do and its not inserting and is only displaying blank could i get a second set of eyes to check the code and tell me where i went wrong? <?php include './config.php'; //(holds the actual database info and some variables for tables (that im not actually using)) //include './access.php'; //(Holds some array variables that i use in other pages.) $db3 = mysql_connect ($hostname, $username, $password) or die ('Failed to connect to database: ' . mysql_error()); mysql_select_db ($database); $authid = "'" . mysql_real_escape_string($_POST['authid']) . "'"; $name = "'" . mysql_real_escape_string($_POST['name']) . "'"; $email = "'" . mysql_real_escape_string($_POST['email']) . "'"; $fid = "'" . mysql_real_escape_string($_POST['fid']) . "'"; $rank = "'" . mysql_real_escape_string($_POST['rank']) . "'"; $access = "'" . mysql_real_escape_string($_POST['access']) . "'"; $admin_id = "'" . mysql_real_escape_string($_POST['admin_id']) . "'"; $group_id = "'" . mysql_real_escape_string($_POST['group_id']) . "'"; $query = "INSERT INTO bioclan.clan_members a INNER JOIN bioclan.admins b ON a.authid = b.auth INNER JOIN bioclan.sm_admins c ON a.authid = c.identity INNER JOIN bioclan.sm_groups d ON d.id = e.group_id INNER JOIN bioclan.sm_admins_groups e ON c.id = e.admin_id (a.authid,a.name,a.email,a.fid,a.rank,b.auth,b.name,b.access,c.identity,c.name,e.admin_id,e.group_id) VALUES ($authid,$name,$email,$fid,$rank,$authid,$name,$access,$authid,$name,$admin_id,$group_id)"; if ($result = mysql_query($query)) { if (mysql_affected_rows() == 1) { echo "<font size=\"+1\" color=\"red\">Update OK!</font>"; mysql_close($db3); include ('./includes/spry.php'); } else { echo "<font size=\"+1\" color=\"red\">Oops! Something went wrong</font>"; mysql_close($db3); include ('./includes/spry.php'); } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/192660-multi-table-insert-not-working/ Share on other sites More sharing options...
jay7981 Posted February 20, 2010 Author Share Posted February 20, 2010 any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/192660-multi-table-insert-not-working/#findComment-1015110 Share on other sites More sharing options...
jay7981 Posted February 21, 2010 Author Share Posted February 21, 2010 i have tried everything i can think of .. and still not working, perhaps a fresh set of eyes could shed some light?? Quote Link to comment https://forums.phpfreaks.com/topic/192660-multi-table-insert-not-working/#findComment-1015532 Share on other sites More sharing options...
jay7981 Posted February 23, 2010 Author Share Posted February 23, 2010 did i post wrong or something? no one knows what i have done wrong with this ... i have tried to rewrite this several times and still nothing happens. Quote Link to comment https://forums.phpfreaks.com/topic/192660-multi-table-insert-not-working/#findComment-1016886 Share on other sites More sharing options...
jay7981 Posted February 23, 2010 Author Share Posted February 23, 2010 wow 71 views and now help ..... Quote Link to comment https://forums.phpfreaks.com/topic/192660-multi-table-insert-not-working/#findComment-1017034 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.