How to create pdf file with mysql data?


Problem :

Can anyone give me simple example, how to create pdf file with mysql data? Im using fpdf http://www.fpdf.org/ for pdf creation. I want to print these data:

$result = mysql_query("SELECT Name, Profesion, Email FROM customers") 
or die(mysql_error());
        if(mysql_num_rows($result) > 0) {
        while($row = mysql_fetch_assoc($result)) {

    echo '
    <td width="200px">'.$row['Name'].'</td> 
   <td width="200px">'.$row['Profesion'].'</td> 
   <td> width="200px">'.$row['Email'].'</td>'; }
    }


Solution :

Have you looked at the scripts section on their site? They have a few good examples of creating a PDF table/report from MySQL. Hope this helps.

http://www.fpdf.org/en/script/index.php


Mysql Tutorials

Mysql Howto..

How to store user's profile picture in mysql

how to update the value of one table when the value is inserted in another table using mysql?

How come many startups used MySQL or PostgreSQL rather than MongoDB when they began? [closed]

how can i get the nearest date values from the current date in mysql

How create a multi sum() for one table with group by and different type for one person

In mysql, can I count how many rows satisfy some condition, if not then exit the count?

How to access online mysql database in android?

How to synchronize mobile contact with PHP and MySQL

How to save query results column into a column in table in same database

How to join mysql query with multiple tables

How to delete Index?

doctrine2: how to convert a one-to-many to a many-to-many without losing data

How do I remove the redundant database name from this script?

How to terminate a query that is displayed in Session Monitor in Toad for MySQL

How to compensate for MySQL timezone difference?

How do you use MySQL spatial queries to find all records in X radius? [closed]

PHP + MySQL: How to select values from a checkbox

How can I pull data from MYSQL based on Longitude, Latitude and radius in PHP PDO?

How to deal with “Open Till” hours in mysql when 04:00 > 23:00?

How to merge the result of this 2 queries in mysql server

How to fix mysql data encoding

PHP order search - on adding item to order refreshes page, how to apply old search query?

how to show non matching mysql result

how to use MySQL for a dynamic pivot table or crosstab

How can I convert this working mysql statement to PDO effectively?

How to alter an event in mysql which is already created

How do I add foreign key constraints in my innodb table without indexing the columns?

how do I show all enum values from database in Java

How to SELECT NOT IN, but taking into account CASE SENSITIVE in Mysql?

How do I convert from a date to string in mySQL?