Page 1 of 1
Retrieving information from MYSQL
Posted: Sun Jun 22, 2008 9:04 am
by nitation
How do i retrieve data from mysql for a specific user. When a user login,i want to be able to retrieve data from a specific table in my database.
Thanks in Advance
Re: Retrieving information from MYSQL
Posted: Sun Jun 22, 2008 11:50 am
by califdon
nitation wrote:How do i retrieve data from mysql for a specific user. When a user login,i want to be able to retrieve data from a specific table in my database.
Thanks in Advance
Your question is not clear. You would need to tell us what your table structure is and what you mean by "user" (are you talking about different MySQL users or just users of your web site?).
Re: Retrieving information from MYSQL
Posted: Sun Jun 22, 2008 1:08 pm
by nitation
Maybe am not asking my question right. Please bear with me.
I have created a session in a file, here is the code below;
Code: Select all
<?php
session_start();
$afso_name=session_name();
$afso_sid=session_id();
$afso_usid=$_SESSION["afso_userid"];
?>
I have also included that piece of code as a file on every page. I want to know exactly how to retrieve information from my database that will be for the current user.
Thanks in advance
Re: Retrieving information from MYSQL
Posted: Sun Jun 22, 2008 8:29 pm
by wasir
You can add another field (user) in your table.
later in your query you can add