[PHP-DB] Re: assigning variables after one-to-many query

2004-04-23 Thread Torsten Roehr
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|

Re: [PHP-DB] Re: assigning variables after one-to-many query

2004-04-23 Thread Rachel Rodriguez
--- 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 +---++

Re: [PHP-DB] assigning variables after one-to-many query

2004-04-23 Thread Uzi Klein
- 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

RE: [PHP-DB] assigning variables after one-to-many query

2004-04-23 Thread fgc
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

Re: [PHP-DB] assigning variables after one-to-many query

2004-04-23 Thread Rachel Rodriguez
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

[PHP-DB] Hi I am new

2004-04-23 Thread water_foul
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

[PHP-DB] Inserting date into a table

2004-04-23 Thread Pambos Nicolaou
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

Re: [PHP-DB] Inserting date into a table

2004-04-23 Thread Rachel Rodriguez
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',