Print datas from a single record

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fvendola
Forum Newbie
Posts: 1
Joined: Mon Dec 27, 2004 3:44 am

Print datas from a single record

Post by fvendola »

Hi there...
I ask to the forum a simple question:
How can I print the data of a single record of my Mysql dbase, with a PHP script .
The proble is that I have to print labels and I need to have a particular layout.

thanks!

Franz
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Re: Print datas from a single record

Post by timvw »

fvendola wrote:Hi there...
I ask to the forum a simple question:
If it is that simple, why don't you answer it yourself? :)

fvendola wrote: How can I print the data of a single record of my Mysql dbase, with a PHP script .
connect to the database server [php_man]mysql_connect[/php_man]
select the database [php_man]mysql_select_db[/php_man]
perform query so that the record is in the resultset [php_man]mysql_query[/php_man]
fetch the data from the resultset [php_man]mysql_fetch_assoc[/php_man]
print [php_man]print[/php_man]
fvendola wrote: The proble is that I have to print labels and I need to have a particular layout.
that is not really a coding problem, but more a html or whatever you want your script-to-output problem. All i can say about this is that you will be probably better off reading a css tutorial that explains the media attribute...
Post Reply