Solved

retreiving data from db

Posted on 2000-03-28
1
211 Views
Last Modified: 2006-11-17
hi...
how can i retrieve data.
im using mysql/php:
<?
$sql="select * from user where id=7";
$databasename="appscan";
$tablename="user";
mysql_connect("haag","elad");
$result=mysql_query($sql);

?>
now...
how can i print the field value that
is from the query result?

how can i loop over the table, if i want
to retrive all info?

sorry...completely new...
im using ASP most of the time...
elad
0
Comment
Question by:eladr
1 Comment
 

Accepted Solution

by:
RHJennings earned 5 total points
ID: 2664259
You can use this to loop though the values, then display them.

while ($row=mysql_fetch_object($result)) {
            echo $row->[field value to display]
      }

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Having trouble getting Imagick working with php on windows. 2 48
if (is_singular not working 5 39
show child records separated by commas 12 36
while read ID; do 4 56
This article discusses how to create an extensible mechanism for linked drop downs.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question