CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Forum login

Print topic Send  topic

Author Message
waqasaltaf

Posts: 37
Posted: 02/17/2008, 7:56 PM

In this (yessoftware forum) we can see the name of the person who has posted the forum. I am tryiing to do similar to this in the Forum provided in CCS examples, every things works fine but i have to put user_id in the forum_messages field manually... let me eplain

i added a user_id field from the users table into forum_messages table.
on the forum i addded like user_id =UserId and put Session instead of URL
and then if i assign user_id numbers(in forum_messages table) manually the user can login and see his posts
what i was trying to do is to connect the users table with the forum_messages table so that when ever user posts a comment the user_id field in the forum_messages table automatically filled up by matching the user_id field in the users table.....

Now i try to add relations in the database but some thing is going wrong... help./

View profile  Send private message
ckroon

Posts: 869
Posted: 02/17/2008, 10:39 PM

Not sure if you mistyped, but it has to be UserID, not UserId.

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
waqasaltaf

Posts: 37
Posted: 02/18/2008, 12:45 PM

nope, the spelling is correct. what problem is, in record builder i want to take value from users table and put it into forum_meassage table. but whenever in the query i am trying to add two tables its just dont allow me to add.
i have uploaded css files and localhost files in here http://rapidshare.com/files/92970645/forum_test.rar.html
if anyone can take a look n help me.

and id;s are

admin admin
guest guest
guest2 guest2
View profile  Send private message
wkempees
Posted: 02/18/2008, 2:44 PM

Table: users
user_id Number, autonumber
[other fields]

Table forum_messages
does not have user_id
but has user_login character
and author character.

Assuming only logged in users (users in the users table) can post messages
AND the author field in forum_messages reflects the posters (Nick)name
equaling the user_login
I would suggest that the field user_login in forum_messages should be
user_id and be numeric.

Not having had enough time to look at what you are doing this change would
enable you to:
1/ show the users posts after he/she logs in by filtering the forum_messages
table on user_id = Session user_ID
2/ show all posts displaying author names (as in fact you can now) by
'copying' the CCGetUserLogin() funtion, which will get the loginname from
the session.

Walter (NL)


waqasaltaf

Posts: 37
Posted: 02/27/2008, 12:18 PM

Quote wkempees:
Table: users
user_id Number, autonumber
[other fields]

Table forum_messages
does not have user_id
but has user_login character
and author character.

Assuming only logged in users (users in the users table) can post messages
AND the author field in forum_messages reflects the posters (Nick)name
equaling the user_login
I would suggest that the field user_login in forum_messages should be
user_id and be numeric.

Not having had enough time to look at what you are doing this change would
enable you to:
1/ show the users posts after he/she logs in by filtering the forum_messages
table on user_id = Session user_ID
2/ show all posts displaying author names (as in fact you can now) by
'copying' the CCGetUserLogin() funtion, which will get the loginname from
the session.

Walter (NL)




Thanks walter CCGetUserLogin() funtion did the job.... thanks for the help...
View profile  Send private message
wkempees


Posts: 1679
Posted: 02/28/2008, 3:15 AM

8-)
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.