In a representative table, I have fields, like, id, mark_id, rep_id rep_name, father name,etc,
In this table, rep_id field is empty,
And in rep_area table, the fields are like id, rep_id, dist_id,etc, in this table, rep_id has values.
While editing the representative form i want to display rep_id from the rep_area table. Hopw to do?
I need the query.
If you wish to match both table, make sure there are some unique keys for the tables to match to each other. select representative.id, representative.mark_id, representative.rep_name, representative.father_name, representative.etc, rep_area.id, rep_area.rep_id, rep_area.dist_id, rep_area.etc from representative,rep_area where rep_area.id = representative.id;
This query is generated based on assumption that both table's id is the same.
Hi, I am a newbie in developing a website. i have tried to connect using mysqli conncetion
Here is my simple code.
// db.php code
//$con = mysqli_connect("localhost","root","","bakery"); ...