veramilomilo wrote:
> Can you possibly direct me to any additional info in
"Foundation PHP" or "PHP
> Solutions" to focus on?
Most of the information you need is already in Chapter 11 of
"Foundation
PHP for Dreamweaver 8", although my forthcoming book, "The
Essential
Guide to Dreamweaver CS4 with CSS, Ajax, and PHP" (due out in
December)
gives more precise instructions on how to insert a date from
those
drop-down boxes.
Basically, your Insert Record server behavior needs to select
just one
of the drop-down menus. You then substitute the value of
$mysqlFormat
for the $_POST variable of the menu you selected.
Say you have three drop-down menus called "year", "month, and
"day".
Select "year" as the value that will be inserted into your
date column.
The section of the INSERT query that handles it will look
like this:
GetSQLValueString($_POST['year'], "date")
If you have used the validation technique described in
"Foundation PHP
for DW8", the full date will be stored as $mysqlFormat. So,
change the
preceding line like this:
GetSQLValueString($mysqlFormat, "date")
To deal with the update form, use MySQL date functions and
aliases to
get the date parts:
SELECT YEAR(myDate) AS year, MONTH(myDate) AS month,
DATE(myDate) AS day, otherColumn1, otherColumn2
FROM myTable
WHERE primary_key = colname
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/