Rachel Rodriguez [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi!
I have a one-to-many relationship between two tables
(table1 and table3) with a linking table between
them (table2):
table1: table2
+---++ +---++
|id | f_name | |id | emailID|
--- Torsten Roehr [EMAIL PROTECTED] wrote:
Rachel Rodriguez [EMAIL PROTECTED]
wrote in message
news:[EMAIL PROTECTED]
Hi!
I have a one-to-many relationship between two
tables
(table1 and table3) with a linking table between
them (table2):
table1: table2
+---++
- Original Message -
From: Rachel Rodriguez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 23, 2004 3:55 AM
Subject: [PHP-DB] assigning variables after one-to-many query
Hi!
I have a one-to-many relationship between two tables
(table1 and table3) with a linking table
Hi,
I would try:
Select email
From table2, table3
Where table3.emailID = table2.emailID
And id = 1
This should give you
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
FG
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
what i would do is add it into an array:
$emails = Array();
while ($row = mysql_fetch_array($result,MYSQL_NUM))
{
$emails[] = $row[0];
}
then u have an array with :
$emails[0] = [EMAIL PROTECTED]
$emails[1] = [EMAIL PROTECTED]
etc...
Thanks, Uzi! This is exactly what I
I am new to databases and php and I was wondering if any one would point me
to a good guide
anything would help :)
thanks in advance,
water_foul
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have created the table below:
CREATE TABLE questions (ID INT NOT NULL AUTO_INCREMENT,name VARCHAR(30),day
TIMESTAMP, question TEXT, email VARCHAR(30),answer TEXT, PRIMARY KEY(ID));
I want to insert into the TIMESTAMP field the date automatically. How can I
do it using the insert command
I want to insert into the TIMESTAMP field the date
automatically. How can I
do it using the insert command
INSERT INTO $table
VALUES('','$name','TIMESTAMP','$question','$email','NULL');
Use the word null (no quotes) in place of 'TIMESTAMP':
INSERT INTO $table
VALUES('', '$name',