PHP - Inner Join Display Info On The Web
Hello.
I am trying to display info from two tables with this code. Code: [Select] <?php $query = mysql_query("SELECT users.username, users2.username FROM users INNER JOIN users2 ON users.id = users2.id"); $numrows = mysql_num_rows($query); if ($numrows != 0) { while ($row = mysql_fetch_assoc($query)) { $username = $row['username']; echo $username . "<br />"; } } ?> However it displays info only from one db (users). I suppose there's something wrong with Code: [Select] <?php ... while ($row = mysql_fetch_assoc($query)) { $username = $row['username']; echo $username . "<br />"; } ... ?> Any help will be appreciated. Thank you. Similar TutorialsI'm currently trying...struggling....to teach myself PHP and I'm really bugged with this database stuff. I am slowly managing but I'm a tad bit stuck now. I want to show a specific piece of information from a table. Lets say my table is structured like so: id user email 1 Bob Bob@Name.com 2 Fred Fred@Name.com 3 Matt Matt@Name.com What would I need to do to display ONLY Freds user? One way I tried only displayed the first rows info (Bob) the second way I tried (with a while loop) only displayed the last rows info (Matt) Heres my current code: <html> <body> <?php include 'dbwire.php'; $query = mysql_query('SELECT * FROM user'); $row = mysql_fetch_array($query); while ($row = mysql_fetch_array($query)) { echo '<b>User:</b> ' . $row['user'] . '<br />'; } ?> </body> </html> I have a 'user' table and a display users page. How would I display them in alphabetical order by their username? Heres my current basic display page: <?php include 'dbwire.php'; include 'header.php'; $query = mysql_query('SELECT * FROM user'); while ($row = mysql_fetch_array($query)) { echo '<b>Username:</b> ' . $row['user'] . '<br />'; echo '<b>Real Name:</b> ' . $row['name'] . '<br />'; echo '<b>Email:</b> ' . $row['email'] . '<br />'; echo '<b>Location:</b> ' . $row['location'] . '<br /> <hr>'; } ?> Theres also an id row but since user wouldn't be added alphabetically I wouldn't be able to order them by id. Howdy, I'm trying to display text from a table in a database. It's a list of quotes, so I just need to pull out the quote and the author name. However, the quote and name are not fields in the same record; they are separate records. Example data: Code: [Select] quoteid name value 1 content You guys are great! Thanks for being awesome. 1 author John Jackson 2 content Gosh you're amazing! Always been so darn helpful! 2 author Peter Davis So, I just need to rip out the data from 'content' and 'author', and then group them together based on the quoteid. This is my code thus far: $testimonial_resource = mysql_query("SELECT name, value FROM quotes GROUP BY quoteid ORDER BY author ASC") or die(mysql_error()); while ($testimonial = mysql_fetch_assoc($testimonial_resource)) { echo '<p>'.$testimonial['value']'.<br /><strong>'.$testimonial['value'].'</strong></p>'; } Any help would be greatly appreciated for this novice. Cheers. Hi there. I have this simple code which displays 5 results. How can i grab each element separately instead of displaying all the results at once. Thanks:) Code: [Select] <?php $query = mysql_query("SELECT product_name, product_price FROM products WHERE product_type = 'laptop' LIMIT 5"); $numrows = mysql_num_rows($query); if ($numrows != 0) { while ($row = mysql_fetch_assoc($query)) { $product_name = $row['product_name']; $product_price = $row['product_price']; echo $product_name . '<br />'; echo $product_price . '<br /><br />'; } } ?> Hi I have tried and tried and tried again to get this to work
in simple terms I have very little knowledge with PHP and even less with mysql
I have a paid subscription and domain in order to learn more and I feel I have made ok progress so far
then I realised how unsafe my current work is;
here is my experience this far
I created a site for a group of voluntary online game hosts where they can posts points from their tournaments in a forum
and some info pages to go with this,
however what I did was create a base template and style sheet and then an admin dashboard linked to individual forms to allow the group admin to edit the info pages they go to my form and enter the desired info and submit this then sends through and action file which posts the text and <BR> to a .txt file,
then the connecting page reads the .txt file using the PHP code of " <? php include ( 'index.txt'); ?>
yes you are seeing this correctly I have allowed a direct edit of text in a .txt file rather silly of me but I didn't realise how unsafe this was until now I guess its a good job I trust that the admin has no knowledge or skills in coding
ok since all this I have created a DB in MySQL on my server,
My server uses PHPMyAdmin I have create a DB named " mnvbcou1_content1 " and a table named " home " with rows " ID " and " home "
what I am trying to do:
I want my page to display the content of the table row home and a form once submitted to send to the table row home
or if needed I can re make this DB if the names are not suitable
I have tried to create the needed coding to make this work but for some reason this just will not work I have already added 2 rows to my table to try and make the page to display the content but it just is not working I got an error every time
so I hope that someone out there is rather patient and is willing to help me learn how to do this correctly and safely,
also this is a closed group website the address to this site is only known by a handful of none programmers I am mainly trying to make this work for my own personal knowledge and server safety please help me
I am working on a project where I want a select form to display information from a MySQL table. The select values will be different sports (basketball,baseball,hockey,football) and the display will be various players from those sports. I have set up so far two tables in MySQL. One is called 'sports' and contains two columns. Once called 'category_id' and that is the primary key and auto increments. The other column is 'sports' and contains the various sports I mentioned. For my select menu I created the following code. <?php #connect to MySQL $conn = @mysql_connect( "localhost","uname","pw") or die( "You did not successfully connect to the DB!" ); #select the specified database $rs = @mysql_SELECT_DB ("test", $conn ) or die ( "Error connecting to the database test!"); ?> <html> <head>Display MySQL</head> <body> <form name="form2" id="form2"action="" > <select name="categoryID"> <?php $sql = "SELECT category_id, sport FROM sports ". "ORDER BY sport"; $rs = mysql_query($sql); while($row = mysql_fetch_array($rs)) { echo "<option value=\"".$row['category_id']."\">".$row['sport']."</option>\n "; } ?> </select> </form> </body> </html> this works great. I also created another table called 'players' which contains the fields 'player_id' which is the primary key and auto increments, category_id' which is the foreign key for the sports table, sport, first_name, last_name. The code I am using the query and display the desired result is as follows <html> <head> <title>Get MySQL Data</title> </head> <body> <?php #connect to MySQL $conn = @mysql_connect( "localhost","uname","pw") or die( "Err:Db" ); #select the specified database $rs = @mysql_SELECT_DB ("test", $conn ) or die ( "Err:Db"); #create the query $sql ="SELECT * FROM sports INNER JOIN players ON sports.category_id = players.category_id WHERE players.sport = 'Basketball'"; #execute the query $rs = mysql_query($sql,$conn); #write the data while( $row = mysql_fetch_array( $rs) ) { echo ("<table border='1'><tr><td>"); echo ("Caetegory ID: " . $row["category_id"] ); echo ("</td>"); echo ("<td>"); echo ( "Sport: " .$row["sport"]); echo ("</td>"); echo ("<td>"); echo ( "first_name: " .$row["first_name"]); echo ("</td>"); echo ("<td>"); echo ( "last_name: " .$row["last_name"]); echo ("</td>"); echo ("</tr></table>"); } ?> </body> </html> this also works fine. All I need to do is tie the two together so that when a particular sport is selected, the query will display below in a table. I know I need to change my WHERE clause to a variable. This is what I need help with. thanks This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=308855.0 Heres what i got... function printLB1 (){ $result = mysql_query("SELECT * FROM leaderboards ORDER BY CollegeFootballPoints DESC"); while ($row = mysql_fetch_object($result)) { $leaderboard[] = $row->Username; $leaderboardPoints[] = $row->CollegeFootballPoints; } $num = mysql_num_rows($reault); //I know from here to ................... needs to be in a var or echo or something. <tr> <td>1.</td> //This will auto increment too like i++ but i cna do that myself! <td>echo $leaderboard;</td> <td>echo $leaderboardPoints;</td> </tr> //Here......................................................... } I need to pull a table row per user. But i want to somehow do it once in a function and then ill echo the function into a table after the php stuff is done. Like i want to pull every a table row per user in the function. then display the function below that way i don't have to write a whole extra query and table row per person. If you understand please help if not please let me know where i can explain more. Thanks Not sure if it is because it is too early in the morning but I am having a problem. Code: [Select] $mpid = # $query = "SELECT table1.title, table2.* ". "FROM table1, table2 ". "WHERE table1.mpid = table2.mpid"; How do I only show the info from the 2 tables where mpid=# Im currently working on a new feature called 'Request Player'. Basically what this does is allows managers to request players within their club for a upcoming fixture. There a multiple teams within a club (Senior As, Senior Bs, Colts U21s). Each team is controlled by a manager. And then they can add players as they need. Anyway, I'm having problems with the sql JOIN. I have currently got this: $check = "SELECT u.* FROM users AS u LEFT JOIN requests AS r ON (u.id = r.player_id) WHERE (u.id = r.player_id)"; I have got two tables. users - all the managers and players. requests - all the requests the managers make to other teams within their club. In the request table i have got this: id player_id - the players that has been requested. fixture_id - the fixture the manager wants to have that player for. accepted - if he has been accepted or not. This comes later on. At the moment i have got it working so that it inserts this data, although the code is working but i want to have a mysql query that checks if a manager has any incoming requests from other teams within the club. BUT only request that has been made to his team.... Could someone please help me out? I'm an amateur PHP/mySQL person, trying to learn some more things, and I've hit a snag trying to do something I haven't done before. Okay, here's what I'm trying to do. I have 3 tables: Items (which includes `id` as the primary key) and a TON of information about each item. Shop (which includes `id` as the primary key) and shop name and location. Sale which has shop_id and item_id. So, what I'm trying to do is have a form where someone can input in an item name and a shop name and have that item then added to the shop. This is where the Sale table comes into play too, as that's going to house each of the items and what shop it's in. I currently have the following queries: $query5 = $db->execute("SELECT id FROM items LEFT JOIN sale ON items.id=sale.item_id"); $query6 = $db->execute("SELECT id FROM shop LEFT JOIN sale ON shop.id=sale.shop_id"); I have the following form: if ($name == "") { $errors++; $errorlist .= "Name is required.<br />"; } if ($location == "" ) { $errors++; $errorlist .= "Location is required.<br />"; } if (!isitem($itemname)) die("That item does not exist."); } if ($errors == 0) { $query = doquery("INSERT INTO `sale` SET `item_id`=`$item`"); admindisplay("New Item Added.","Add Items"); $page = <<<END <b><u>Add Item</u></b><br /><br /> <form action="create_shop.php?do=additem" method="post"> <table width="90%"> <tr><td width="20%">Name:</td><td><input type="text" name="itemname" size="30" maxlength="255" value="" />**Be sure the item is already in the database and matches it IDENTICALLY.</td></tr> <tr><td width="20%">Location:</td><td><input type="text" name="location" size="30" maxlength="55" value="" /><br /><span class="small">Where is the item obtained (unique shop name, please!)</span></td></tr> </table> <input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /> </form> What next steps do I need to take? Am I even on the right path? Thanks for any and all help anyone provides!! I really appreciate it! I'm trying to pull from my database every spell or attack that is equal to `All`, but it doesn't seem to be working. All it is doing is pulling all the spells, regardless of class = `All`, and also 0 of the attacks. It should be producing a single attack that is = to `All` as no spells are = `All`. Any help would be greatly appreciated! Thanks! (This is my first attempt at a JOIN statement...) $query = "SELECT attacks.id, attacks.name, attacks.price, attacks.class, attacks.descript, spells.id, spells.name, spells.price, spells.class, spells.descript ". "FROM attacks, spells ". "WHERE attacks.class = 'All' || spells.class = 'All' order by attacks.name, spells.name asc"; I'm trying to figure out the best way to do this if I'm doing it right with my for loop. With how many numAnswers there are for the selected poll its going to put the div with the label and text box for each of those but its giong to go and tie in each of those pollAnswers with what ID of the pollAnswer to the pollAnswer table. Code: [Select] $pollsQuery = " SELECT polls.question, polls.statusID, polls.numAnswers, DATE_FORMAT(polls.dateExpires, '%m/%d/%Y') AS dateExpires FROM polls WHERE polls.ID = '" . $pollID . "'"; $pollsResult = mysqli_query ( $dbc, $pollsQuery ); // Run The Query $row = mysqli_fetch_array ( $pollsResult, MYSQL_ASSOC ); $pollAnswers = " SELECT pollAnswers.ID, pollAnswers.answer FROM pollAnswers WHERE pollAnswers.pollID = '" . $pollID . "'"; $pollAnswersResult = mysqli_query ( $dbc, $pollAnswers ); // Run The Query Code: [Select] <fieldset class="answerLeg"> <legend>Edit Poll Answers</legend> <?php for ( $j = 0; $j <= $numAnswers; $j++) { ?> <div class="field required answers"> <label for="answer<?php $j?>">Answer <?php $j?></label><input type="text" class="text" name="answer<?php $j?>" id="answer<?php $j?>" title="Answer <?php $j?>"/> <span class="required-icon tooltip" title="Required field - This field is required, it cannot be blank, and must contain something that is different from emptyness in order to be filled in. ">Required</span> </div> <?php } ?> </fieldset> Hello everyone,
I am hopping someone can help me sort out a query.
I have two tables, one table is a players table, and a second table is a player_vitals data that stores heights and weight changes. I want to list all the players showing the latest height and weight change.
this query will not fetch the latest height and weight
SELECT a.player_id, a.player_first_name,a.player_last_name, b.player_height, b.player_weight First off Please bear with me. I am newbie. Here is a table name 'Employes' and has following Columns. ID(PK) | FirstName | LastName | SecurityLicence | CrowdLicence | DriversLicence | Password | And through form all the values are assigned to these columns and user gets registered. I have done it using this code and its working fine. Code: [Select] <?php session_name('YourVisitID'); session_start(); if(!isset($_SESSION['FirstName'])) { header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/index.php"); exit(); } else { $page_title = 'Register'; include('templates/header.inc'); if(isset($_POST['submit'])) { require_once('mysql_connect.php'); // connect to the db //Create a function for escaping the data. function escape_data($data) { global $con; // need connection if(ini_get('magic_quotes_gpc')) { $data = stripslashes($data); } return mysql_real_escape_string($data, $con); } $message = NULL; if(empty($_POST['firstName'])) { $fn = FALSE; $message .= '<p>you forgot to enter your first name!</p>'; } else { $fn = escape_data($_POST['firstName']); } if(empty($_POST['lastName'])) { $ln = FALSE; $message .= '<p>You forgot to enter your last name!</p>'; } else { $ln = escape_data($_POST['lastName']); } if(empty($_POST['licenceId'])) { $li = FALSE; $message .='<p>You Forgot enter your Security Officer Licence Number!</p>'; } else { $li = escape_data($_POST['licenceId']); } if(empty($_POST['crowdLicenceNo'])) { $cln = FALSE; $message .='<p>You Forgot to enter your Crowd Controller Licence Number!</p>'; } else { $cln = escape_data($_POST['crowdLicenceNo']); } if(empty($_POST['driverLicenceNo'])) { $dln = FALSE; $message .='<p>You forgot to enter your Driving Licence Number!</p>'; } else { $dln = escape_data($_POST['driverLicenceNo']); } if(empty($_POST['password'])) { $p = FALSE; $message .='<p>You forgot to enter your password!</p>'; } else { if($_POST['password'] == $_POST['password2']) { $p = escape_data($_POST['password']); } else { $p = FALSE; $message .='<p>Your password did not match the confirmed password</p>'; } } if($fn && $ln && $li && $cln && $dln && $p) { $query = "SELECT ID FROM Employes WHERE SecurityLicence='$li'"; $result = @mysql_query($query); if(mysql_num_rows($result) == 0) { $query = "INSERT INTO Employes (FirstName, LastName, SecurityLicence, CrowdLicence, Driverslicence, Password) VALUES ('$fn', '$ln', '$li', '$cln', '$dln', PASSWORD('$p'))"; $result = @mysql_query($query); if($result) { echo '<p>You have been registered</p>'; } else { $message = '<p>We apologise there is a system error.</p><p>' . mysql_error(). '</p>'; } } else { $message = '<p>That Security Licence is already registered</p>'; } mysql_close(); } else { $message .='<p>Please try again</p>'; } } //print the message if there is one if (isset($message)) { echo '<font color="red">', $message, '</font>'; } } ?> <script type="text/javascript"> function validate_form() { var f = document.forms["regForm"]["firstName"].value; if(f==null || f=="") { alert("First Name must be filled out"); return false; } var l = document.forms["regForm"]["lastName"].value; if(l==null || l=="") { alert("Last Name must be filled out"); return false; } var sl = document.forms["regForm"]["licenceId"].value; var s = /^\d{5,}$/g.test(sl); var sll = sl.length; if(s==false) { alert("Security Licence No must be filled out in digits"); return false; } else if(sll>=7) { alert("Invalid Security Licence No"); return false; } var csl = document.forms["regForm"]["crowdLicenceNo"].value; var k = /^\d{5,}$/g.test(csl); var csll = csl.length; if(k==false) { alert("Crowd Controller Licence No must be filled out in digits"); return false; } else if(csll>=7) { alert("Invalid Crowd Controller Licence No"); return false; } var d = document.forms["regForm"]["driverLicenceNo"].value; var v = /^\d{6,}$/g.test(d); var dl = d.length; if(v==false) { alert("Driver's Licence No must be filled out in digits"); return false; } else if(dl>=11) { alert("Invalid Driver's Licence No"); return false; } } </script> <h3>Employment Registration Form</h3> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" name="regForm" method="post" onsubmit="return validate_form()"> <fieldset> <legend>Enter informations in the form below</legend> <table> <tr><th>First Name:</th><td><input type="text" name="firstName" /></td></tr> <tr><th>Last Name:</th><td><input type="text" name="lastName" /></td></tr> <tr><th>SO Licence No:</th><td><input type="text" name="licenceId" size="5" /></td></tr> <tr><th>CC Licence No:</th><td><input type="text" name="crowdLicenceNo" size="5" /></td></tr> <tr><th>Driver's Licence No:</th><td><input type="text" name="driverLicenceNo" size="10" /></td></tr> <tr><th>Create Password:</th><td><input type="password" name="password" size="10" /></td></tr> <tr><th>Confirm Password:</th><td><input type="password" name="password2" size="10" /></td></tr> </table> <input type="submit" name="submit" value="Register" /> <input type="reset" value="Reset" /> </fieldset> </form> <?php include('templates/footer.inc'); ?> Here is another Table "Jobs", with the following columns. JobID(PK) | ID(FK) | JobDate | JobStart | JobFinish | JobLocation | RequestedBy | For Example I am the owner of the company and want to assign jobs to my registerd workers using a form. I assign JobDate=12/12/12 JobStart=1900 JobFinish=2300 JobLocation=Perth Requestedby=John. And I do it using form. JobID will be incremented automatically. Now what i dont understand is how do I assign ID(FK) to it?? I am newbie this question may sound stupid to many of you but hey please help. Or should I replace ID(FK) with the SecurityLicence of the worker, Like this JobID(PK) |ToSecurityLicence | JobDate | JobStart | JobFinish | JobLocation | RequestedBy | What I want is when the workers signs in He should see the job assigned to him. Can I do it using inner join??? if so how to right PHP code for comparing these two tables??? I am way too much confused. Too many of you I have made a fool of myself asking this question. But I believe a person who doesnt ask the question is fool foreva. If somebody could Help I would really really aprreciate it. Thanks. Hi I want to know I can select which ID I get from an inner join? Not sure If I should post here or in the MYSQL forum, but as it's using OOP I posted here. Code: [Select] $sql = "SELECT * FROM area_county INNER JOIN area_country "; $sql .= "ON area_county.country_id = area_country.id "; $sql .= "ORDER BY area_country.country, area_county.county ASC "; $sql .= "LIMIT {$per_page} "; $sql .= "OFFSET {$pagination->offset()}"; $list = Area_county::find_by_sql($sql); foreach($list as $lists){ $ID = $lists->id; $country_id = $lists->country_id; $county = ucwords($lists->county); $country = ucwords($lists->country); echo $ID; } I want it to show the ID of the county, NOT the id of the country. both tables in the database have the ID column called id. I know this can be done, but not to sure how. Thanks Hello, I'm trying to get a join with 2 tables but cannot get it to work. It's a contentsystem with an ID for the author. Another table tells the name of the author. Now I want to join these things. This is what i've coded so far: <? $query = "SELECT rmnl_content.content_aid, COUNT(rmnl_content.content_id), rmnl_crew.crew_id, rmnl_crew.crew_name FROM rmnl_content, rmnl_crew" "where rmnl_content.content_aid = rmnl_crew.crew_id"; $result = mysql_query($query) or die(mysql_error()); // Print out result while($row = mysql_fetch_array($result)){ echo " <b>". $row['COUNT(rmnl_content.content_id)'] ."</b> posted messages by ". $row ['crew_rmnl.crew_name'] ."</td> ."; echo "<br />"; } ?> I am somewhat of a newbie and think this is a simple fix, but I have been having problems and can't seem to figure it out. I am trying to JOIN two tables, but am not getting the results I would like. I am getting the correct question number displayed whenever I try different instances, but it always defaults to the "DTCAP" question (q_code).
I have included the snippet of code and how the table structure looks. Any help would be greatly appreciated!
-------------------------------------------------------------------------------------
//Testing to ensure that the $_SESSION['code'] is DTCAP, CNROW, or MONFW after user chooses option
echo $_SESSION['code'];
$query_question=mysql_query("SELECT * FROM adventure_questions q INNER JOIN users_adventures u ON q.q_number = u.ua_question WHERE u.ua_username = '$_SESSION[username]' AND u.ua_code='$_SESSION[code=auto:0]'"); $question_info=mysql_fetch_array($query_question); echo $question_info['q_number'].". ".$question_info['question']; ------------------------------------------------------------------------------------- adventure_questions q_id q_code q_number question 1 DTCAP 1 DTCAP question 1 2 DTCAP 2 DTCAP question 2 26 CNROW 1 CNROW question 1 27 CNROW 2 CNROW question 2 51 MONFW 1 MONFW question 1 52 MONFW 2 MONFW question 2 users_adventures ua_id ua_username ua_code ua_question ua_score 1 kjb31ca DTCAP 1 0 2 kjb31ca CNROW 2 10 3 kjb31ca MONFW 1 0 Edited by KjB31ca, 20 May 2014 - 06:39 AM. I need to get the friends password and insert it into the table so the friend can delete it later can some one help me do a table join <?php //include the connect script include "../../../../connect.php"; //Post variables from flash $username = $_POST['username']; $password = $_POST['password']; $status = $_POST['status']; $friend = $_POST['friend']; $username = stripslashes($username); $password = stripslashes($password); $status = stripslashes($status); $friend = stripslashes($friend); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $status = mysql_real_escape_string($status); $friend = mysql_real_escape_string($friend); $sql = mysql_query("SELECT * FROM user_declined_list WHERE username = '$username' and password = '$password' and friend = '$friend' and status ='$status'"); $rows = mysql_num_rows($sql); $your_username=$rows['username']; if($rows > 0) { echo "&msgTextFriendShipRejected= RESEND NEW FRIEND REQUEST SUCCESSFULLY!"; // ok they are now our friend but we are not thier friend so lets insert the friendship in reverse and set the status to 1 on both ends // Problem i see is this if the user wishs to remove the friend later he will neen his password set to delete from this table. // so i need to do a join table again where friend password gets inserted here.. $insertnewfriend = mysql_query("INSERT INTO user_friends_list (username,password,friend,status) VALUES ('$friend','$password','$username','0')") or die(mysql_error()); //ok lets update the request and set the friend to be a friend becuase we said yes be my friend. $deleteuserfriend = mysql_query("DELETE FROM user_declined_list WHERE username = '$username' and password = '$password' and friend = '$friend' and status ='0'"); return; } ?> Hi guys,
I’m really hoping someone can help with this query. I'm sure it must use join somehow but i cant work out exactly how to do it.
I have two tables (‘booking_slots’ and ‘booking_reservation’). ‘booking_slots’ has ‘slot_date’ and ‘slot_id’ fields. ‘booking_reservation’ has a number of fields including ‘slot_id’ but not ‘slot_date’.
I want to run a query to delete all records between a certain date range in BOTH tables (say for example 01 Jan 2012 to 01 Jan 2013). To do this I want to find and delete all records using ‘slot_date’ in ‘booking_slots’ and use the corresponding ‘slot_id’ of the deleted records to delete the records with the same ‘slot_id’ in ‘booking_reservation’.
Any help with this would be very greatly appreciated.
Thanks
|