Solved

retreiving data from db

Posted on 2000-03-28
1
183 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Wordpress Query 1 34
MySQL database data submission 7 39
Wordpress type image upload 10 30
Converting SQL server date to string 3 15
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now