Getting a field value
| From: | drparker | Date: | Sun, 15 Dec 2002 17:22:06 +0000 |
| Subject: | Getting a field value | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-128330@lists.php.net to get a copy of this message | ||
I'm adding information with the INSERT command to 2 tables. In the
first table, called "courses", I have a field called "course_id" that is
an auto-increment - assigned by the table. In the second table, called
"par", I have a field also called "course_id". I need to assign to
this field the value that is assigned for "course_id" in the "courses"
table. The problem is, I don't know what it is going to assign, and I
can't get the variable with a query such as "SELECT * FROM counties
WHERE course_id = ##" because I don't know what number is going to be
assigned as the course_id. Basically, I need to store the that
course_id value of the course I just added in a a variable, and I don't
know how to retrieve that variable.
Any help would be greatly appreciated...