|
Convenient web based access to our favorite web design Usenet groups
|
 |
This is Interesting: Free Magazines for Graphics designers and webmasters
| Author |
| Thread |
 |
|
|
|
|
|
 |
 |
|
|
|
  10-25-05 - 11:29 PM
|
In article <1130205871.363293.172550@g43g2000cwa.googlegroups.com>,
masta_d_funk@hotmail.com says...
>
>Hey
>
>I have a problem using dreamweaver. The problem is im creaing a login
>page that accepts the username and password. When the user logins i
>only want their information displayed. My columns for the username
>consists of UserID, Username and Password. And my other table is called
>Data consisting of UserID, Email, Address, etc.. When the user logins i
>want it to check in the Data table for the UserID so that it displays
>his/her information only. i know i can do it if i had a Username column
>in the Data table, but i do not want that..
>
>im currently using dreamweavers login authentication wizard..which
>takes in 2 values..the username and password..i need help on creating a
>recordset that will user the users UserID and will link it to the Data
>UserID column..
There are a couple of ways to handle this. First of all, are you sure you ca
n't
combine those fields in a single table? I don't know your schema or data, bu
t
those fields are related to users and might belong together.
If the columns do belong in 2 tables, then you need to write SQL to join the
tables together on the common UserID field. You need to go to the Advanced t
ab
on the RecordSet dialog and enter your SQL.
Another option is to create a view in your DBMS (in Access you could use a
query) that joins the tables, and then select the view from the Recordset
dialog. But for a simple query like yours, this is overkill.
|
|
|
| [
Post Follow-Up to this message ]
|
|
|
|
|
 |
|
|
|
  11-01-05 - 03:23 AM
|
In article <1130801635.319726.306990@g14g2000cwa.googlegroups.com>,
masta_d_funk@hotmail.com says...
>
>ok thx...ive tried creating the advanced SQL statement..my SQL
>statement is like this:
>SELECT tblCustomer.sUsername, tblIssue.sIssueNumber,
>tblIssue.iIssueDate, tblIssue.sZIP, tblIssue.sEXE, tblIssue.sPDF
>FROM tblCustomer INNER JOIN tblIssue ON
>tblCustomer.iUserID=tblIssue.iUserID;
>WHERE tblIssue.iUserID = tblCustomer.iUserID
>
>But when i want to use the iUserID as a session variable it displays an
>error message. My session variable is Session("MM_Username) where the
>MM_Username is the sUsername is my table...
>
>Im creating a website that has 2 tables, when the user accesses the
>website..he/she can only download the updates that are currently issued
>to them..So that is why ive created 2 tables..one of the user details
>and the other is the table where it looks up for the iUserID...
OK, first of all, I'm not that familiar with MySQL join syntax as I don't us
e
that DBMS. But it seems to me that you have a redundant join in the where
clause. In other DBMS's, you can either use the join keyword, or put the joi
n in
the where clause - but not use both.
What you don't have in the where clause is the UserID that the user logged i
n
with. So you are probably getting multiple rows returned. You need to restri
ct
the result set to the user that has logged in by including the session varia
ble
in the where clause. Or is that where you are having the problem?
|
|
|
| [
Post Follow-Up to this message ]
|
|
|
|
|
 |
|
|
 |
| All times are GMT. The time now is 09:15 AM. |
 |
|
|
|
|
|  |
|