Re: [PHP-DB] Doc to PDF with mssql

2009-11-04 Thread Rafael Costa Pimenta
But the link http://doc2pdf.sourceforge.net/overview.html seems to use
e-mail, i did not understand, I just want to extract a word .doc file from
the mssql database, save in a temp directory, convert to the PDF format and
let the user download the PDF file.

2009/11/3 Chris dmag...@gmail.com

 Rafael Costa Pimenta wrote:

 Hi
 someone knows how to convert a word .doc to a PDF using PHP?


 There are external tools available to do it.

 http://doc2pdf.sourceforge.net/overview.html is one such tool.

 After installing it you exec the binary:

 exec('pdf2doc blah blah');

 where 'blah blah' is whatever pdf2doc tells you to put in.


  and how to store and retrieve a .doc file in a mssql database?


 I searched for 'mssql binary data' and found this article:


 http://www.databasejournal.com/features/mssql/article.php/1475641/Storing-and-Retrieving-Binary-Data-in-SQL-Server.htm

 --
 Postgresql  php tutorials
 http://www.designmagick.com/




-- 
Rafael Costa Pimenta
Analista de Sistemas
Fresenius Medical Care - RJ - Brasil
Tel. 55 21 2179-2484 (Escritório central)


Re: [PHP-DB] PHP Update query

2009-11-04 Thread Jason Gerfen

$query = UPDATE `clients` SET `company` = '$company', `contact` =
'$contact', `phone` = '$phone', `city` = '$city' WHERE
`clients`.`reference` =$client LIMIT 1;
$client_result=mysql_query($query);

// now check for errors
mysql_error()  mysql_errno()

Sudheer Satyanarayana wrote:

On Tuesday 03 November 2009 11:29 AM, Ron Piggott wrote:

How do I test if an UPDATE query worked

$query = UPDATE `clients` SET `company` = '$company', `contact` =
'$contact', `phone` = '$phone', `city` = '$city' WHERE
`clients`.`reference` =$client LIMIT 1;
$client_result=mysql_query($query);

???

Ron

   

From the manual page:

For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, 
*mysql_query()* returns *TRUE* on success or *FALSE* on error. 


If $client_result == true you know the query was successful.





--
Jason Gerfen
Systems Administration/Web application development
jason.ger...@scl.utah.edu

Marriott Library
Lab Systems PC
295 South 1500 East
Salt Lake City, Utah 84112-0806
Ext 5-9810


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Doc to PDF with mssql

2009-11-04 Thread Chris

Rafael Costa Pimenta wrote:
But the link http://doc2pdf.sourceforge.net/overview.html seems to use 
e-mail, i did not understand, I just want to extract a word .doc file 
from the mssql database, save in a temp directory, convert to the PDF 
format and let the user download the PDF file.


There's a lot of stuff in there. Concentrate on each part separately and 
don't worry about the next part just yet.


try http://www.phplivedocx.org/2009/02/06/convert-doc-to-pdf-in-php/ for 
changing your doc to a pdf.


To get a doc in/out of mssql, there seems to be some magic you have to do:

http://www.webdeveloper.com/forum/archive/index.php/t-213799.html

If they don't work you're going to have to be more specific about what 
you're having problems with.


--
Postgresql  php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Doc to PDF with mssql

2009-11-04 Thread Chris

Chris wrote:

Rafael Costa Pimenta wrote:
But the link http://doc2pdf.sourceforge.net/overview.html seems to use 
e-mail, i did not understand, I just want to extract a word .doc file 
from the mssql database, save in a temp directory, convert to the PDF 
format and let the user download the PDF file.


There's a lot of stuff in there. Concentrate on each part separately and 
don't worry about the next part just yet.


try http://www.phplivedocx.org/2009/02/06/convert-doc-to-pdf-in-php/ for 
changing your doc to a pdf.


To get a doc in/out of mssql, there seems to be some magic you have to do:

http://www.webdeveloper.com/forum/archive/index.php/t-213799.html

If they don't work you're going to have to be more specific about what 
you're having problems with.


See also http://www.rochester.edu/it/web/WebHelp/mssql/datatypes.html

--
Postgresql  php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php