Re: Relational mySQL in PHP
| From: | Daniel Convissor | Date: | Tue, 08 Aug 2000 00:05:03 +0000 |
| Subject: | Re: Relational mySQL in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10557@lists.php.net to get a copy of this message | ||
John Coggeshall wrote:
>
> What I have is a primary table, in this table, I want to store certain
> references to rows in other tables. What's the best way to do this using
> PHP? Is there a better way to do it using pure mySQL?
Your question is kind of vague. I hope I come close to answering it.
Just to be clear, you can use PHP to get data into and out of MySQL tables
without problem. The trick is figuring out the query is you need to run in
each situation. The next step is to create the code that will contain or
generate the query strings in question.
To insert/update data in multiple tables, you'll need to write multiple
queries. So, if you have a form with the person's name and then a history of
all their appointments, you'll use one query to change their name in one
table and then another query to update their appointments in the other table.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
More than just answers. Solutions. (SM)
http://www.analysisandsolutions.com/
4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409