Jump to content

smd8061

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

smd8061's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can someone please tell me how i would pull data from multiple tables in my database and then print the info in designated spots on a pdf file???? I know how send it to a pdf file and how to add it in the spots just not pull the multiple info and post it all side by side. I'm sorry in advanced if this explanation is not clear enough. I will try to be more clear when i reply. Thank you all, smd8061
  2. I am trying to pull some info from my database and print it in the spots that I have the X and Y coordinates for. How would i print the info in the spots?????? <?php //SHOW A DATABASE ON A PDF FILE define('FPDF_FONTPATH','font/'); require('fpdf.php'); //Create a new PDF file $pdf=new FPDF(); $pdf->Open(); $pdf->AddPage(); mysql_connect('HOST', 'USERNAME', 'PASSWORD') or die('Could not connect: ' . mysql_error()); mysql_select_db('software') or die('Could not select database'); $result=mysql_query('select Date,Name,TotalPrice from Invoices ORDER BY Date'); $number_of_products = mysql_numrows($result); //Initialize the 3 columns and the total $column_date = ""; $column_name = ""; $column_totalprice = ""; $total = 0; mysql_close(); //Convert the Total Price to a number with (.) for thousands, and (,) for decimals. $total = number_format($total,',','.','.'); //Fields Name position $Y_Fields_Name_position = 20; //Table position, under Fields Name $Y_Table_Position = 26; //Now show the 15 columns //First Check $pdf->SetFont('Arial','',18); $pdf->Text(125,20,'Date'); <---- This should be replaced with database info $pdf->Text(35,35,'Name'); <---- This should be replaced with database info $pdf->Text(160,35,'TotalPrice'); <---- This should be replaced with database info $pdf->Text(5,45,'One Million and 0/100 ****************************************'); <---- This should be replaced with database info $pdf->Text(8,82,'Signature'); <---- This should be replaced with database info $pdf->Output(); ?>
  3. OK, i guess i wasn't clear on what i was trying to get it to do. I have a drop down box and i want to be able to select a columns name and then in the text box input a number, and when you hit search it will search that number in one of the columns IE: the one you selected in the drop down box. Then script searches the database in the column that is selected for the number that you inputed, and it then posts in a table the information that corresponds with that number.
  4. Not to sound ungrateful or anything but I tried that and now it is not even using the forms or searching, it is just showing the database. 2 2 2 3 2007-11-12 1000 $9000 2008-01-22 1 1 1 1 2007-11-12 100 $1000 2008-01-01 1 1 1 2007-11-12 100 $400 2 2 2 2007-11-12 300 $2001 IT Looks Like this only with the none used forms on top.
  5. I did that and this is what it says: Query failed: Query was empty
  6. Twostars I tried it and it says this.
  7. Sorry I just am tired of trying to get this to work. and thank you very much twostars I will try this.
  8. I get that, I just don't know how I would pull the info using forms to select my column name. my columns are: - PO Number - Invoice ID - Vendor ID - Material ID - Date - Quantity - Estimated Total - Total Price - Due Date
  9. OK, i guess i wasn't clear on what i was trying to get it to do. I have a drop down box and i want to be able to select a columns name and then in the text box input a number, and when you hit search it will search that number in one of the columns IE: the one you selected in the drop down box. That is where the $select comes from it is the drop down box.
  10. ok so if i change HEADING for COLUMN it should work?
  11. I thought that there might be a syntax that lets you search by the headings of the databases. that is why i tried HEADING.
  12. i will try the $_GET, and revraz I do not get what you mean by field name.
  13. I removed the single quotes from around HEADING and it showed this under my forms. Query failed: Unknown column 'HEADING' in 'where clause'
×
×
  • 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.