Currently working with
PHP 4.2.3
MySQL 3.23.54
phpMyAdmin 2.3.3pl1
Im using two mysql tables example below.
Im trying to find out howto link fields within them.
How would i go about linking table request, field Department to table departments, field Department
If this is possable with linked tables would it also be possable to have mysql store this query
So requests.Department outputs the linked table data, when used by php.
Rather than php passing querys all time?
(requests)
ID
Request
Request_Date
Requset_Status
Department +
(departments)
ID
Department +
Please help me PHPDN kenobi you are my only hope.
MySQL Linked tables Query help
Moderator: General Moderators
mysql does not support stored procedures by now.
By linking tables do you mean join? http://www.mysql.com/doc/en/JOIN.htmlhttp://www.mysql.com/doc/en/ANSI_diff_Triggers.html wrote:The planned update language will be able to handle stored procedures. Our aim is to have stored procedures implemented in MySQL Server around version 5.0. We are also looking at triggers.
I think a view would do this for you. This way, you could set up a view that is really a query that joins the two tables, but you would use the view as if it were a table. Unfortunately, MySQL does not support views yet.
Cheers volka, rob
As im currently not to well informed with mysql
But with mysql well documented site and your replys im getting there.
Reason i am approching mysql like this is because of the way i have setup
php to read the mysql tables, dynamically building html forms depending
on the mysql field column type with out running any real query as such.
So if anything in the database is changed, the php output changes to suit.
Join looks like it would work if mysql had the option of stored procedures.
View would also proberly work if mysql supported this option.
Nether the less, mysql, phpmyadmin, are impressive pieces of kit.
Cheers all for your help
As im currently not to well informed with mysql
But with mysql well documented site and your replys im getting there.
Reason i am approching mysql like this is because of the way i have setup
php to read the mysql tables, dynamically building html forms depending
on the mysql field column type with out running any real query as such.
So if anything in the database is changed, the php output changes to suit.
Join looks like it would work if mysql had the option of stored procedures.
View would also proberly work if mysql supported this option.
Nether the less, mysql, phpmyadmin, are impressive pieces of kit.
Cheers all for your help