AdonaiEchad wrote:
> Is the record set supposed to be as follows...
>
> SELECT *
> FROM myusers
> WHERE myusers.userID = "$_SESSION['userID']"
There are several things wrong with that query. First of all,
you cannot
put an array element, such as $_SESSION['userID'] in double
quotes.
Second, the whole query will be surrounded in double quotes
by
Dreamweaver, so you have a conflict of quotes. Third, userID
will be a
number, so it shouldn't be in quotes anyway.
When building a query like this in Dreamweaver, use the
Recordset dialog
box to define the variable, and select Number as the data
type.
Most important of all, where are you going to get
$_SESSION['userID']
from in the first place?
Create a recordset called getID, and use the following SQL:
SELECT userID FROM myusers
WHERE username = var1
In the Variables field, define var1 as
$_SESSION['MM_Username'], and set
its data type to text.
You can then create $_SESSION['userID'] like this (put it
after the
recorset code):
$_SESSION['userID'] = $row_getID['userID'];
--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/