Jump to content

Retrieving information from MYSQL


nitation

Recommended Posts

Hello guys,

 

I have a user's panel that requires authentication to gain access. I am making use of session here. What i want to ask is;

 

How do i retrieve data from two tables in a mysql database. In this situation, am not looking at joining the tables.

 

Below is a sample code

 

<?php 
						 if (isset($afso_userid))
							{ 
						  $sqluser=mysql_query("select * from register_account where id='$afso_userid' ") ;
                if (!empty($sqluser)){
			$numuser=mysql_num_rows($sqluser);
		    while($rowuser=mysql_fetch_array($sqluser)){
		    $id=$rowuser["id"];
		    $placehold=$rowuser["placehold"];
			$date=$rowuser["adddate"];
			$typeoftxn=$rowuser["typeoftxn"];
			$account_number=$rowuser["account_number"];

			}
                

		  ?>

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/111324-retrieving-information-from-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.