[PHP-DB] Re: Help with a query

2003-03-04 Thread Joel Colombo
i am not testing this... just writing it here. and it is 2am ! SELECT shopping_cart.item_id, shopping_cart.subtotal, shopping_cart.quantity FROM shopping_cart, orders WHERE shopping_cart.order_id = orders.order_id AND orders.session_id = session_id() AND orders.customer_id = '$customer_id' i gues

[PHP-DB] PHP on Mandrake

2003-03-04 Thread Chris Payne
Hi there everyone, Just installed Mandrake Linux 9.1 with Apache 2.0 which is excellent. However, PHP isn't configured and from what I can tell the version it installed (Mandrake) is the CGI version when I got the info from the command line. How can I configure Apache 2.0 to use the CGI versi

Re: [PHP-DB] php and local printing

2003-03-04 Thread Rajesh Fowkar
On Tue, Mar 04, 2003 at 06:45:54AM -0800, Mark wrote: >It dopesn't seem like you got an answer to this. Spot on. Yours is the first reply. >To print locally, >you'll need to use Jscript of something similar on the local end. >I've only seen this work in IE, but I haven't looked into it too >dee

[PHP-DB] Problem with php and mysql

2003-03-04 Thread Kevin Demers DSL
Hi everyone, One of our customers has written a php application that we are hosting. Basically, there is a province/state table which populates a combo box. When the form containing this combo box is submitted, the information is added into the database. The problem is that when nothing is selec

[PHP-DB] Re: PHP and MS SQL Server 7.0

2003-03-04 Thread Manuel Lemos
Hello, On 03/04/2003 06:22 PM, Michael Morrison wrote: I would like to use PHP to open a connection to a MS SQL server, query the database, and then use the query results to generate dynamic content for a mass HTML e-mail campaign. Is it possible to execute PHP scripts in an HTML file or must

[PHP-DB] PHP and MS SQL Server 7.0

2003-03-04 Thread Michael Morrison
I would like to use PHP to open a connection to a MS SQL server, query the database, and then use the query results to generate dynamic content for a mass HTML e-mail campaign. Is it possible to execute PHP scripts in an HTML file or must the file have a .php extension? I'm limited by the sof

RE: [PHP-DB] Serialize...Unserialize

2003-03-04 Thread Hutchins, Richard
Thanks for the feedback, Gerard. One thing I've learned in this experiment is that once the data is serialized and put into the readBy (TEXT) column, I can't really do any queries that do comparisons on the data stored in that column because of the serialization "markup". Unfortunately, this is a r

Re: [PHP-DB] date functions (generates parse error)

2003-03-04 Thread 1LT John W. Holmes
> Here is the whole code of my function > > Whenever i run it, it say's there is a parse error on line 6, can't see what > is the problem > the format of $weekstart (as it is stored in the Database) is -MM-DD > > = > function tips

Re: [PHP-DB] date functions (generates parse error)

2003-03-04 Thread David Rice
Here is the whole code of my function Whenever i run it, it say's there is a parse error on line 6, can't see what is the problem the format of $weekstart (as it is stored in the Database) is -MM-DD = $start = date('Ymd',strto

Re: [PHP-DB] Mysql compress text field?

2003-03-04 Thread 1LT John W. Holmes
> I have a new project where i need show pages of report on demmand. That > reports are created in the batch process, and the whole file size is about 5 > Gb. (thats includes all the reports in a month, I need save about 12 month). > > I think in two alternatives : > > 1. I save the lin

Re: [PHP-DB] Serialize...Unserialize

2003-03-04 Thread Gerard Samuel
Hutchins, Richard wrote: I have an array of values I want to store in a MySQL db in a column called readBy of type TEXT. I want to take that array and serialize it then insert it into the db. No big deal. When I query the db and get the value from the readBy column, I know I have to unserialize it

[PHP-DB] Mysql compress text field?

2003-03-04 Thread Patricio Vera S.
Hello to all, I have a new project where i need show pages of report on demmand. That reports are created in the batch process, and the whole file size is about 5 Gb. (thats includes all the reports in a month, I need save about 12 month). I think in two alternatives : 1. I save

[PHP-DB] Serialize...Unserialize

2003-03-04 Thread Hutchins, Richard
I have an array of values I want to store in a MySQL db in a column called readBy of type TEXT. I want to take that array and serialize it then insert it into the db. No big deal. When I query the db and get the value from the readBy column, I know I have to unserialize it. Again, no big deal. My

Re: [PHP-DB] preg_match_all

2003-03-04 Thread Koleszár Tibor
Hi, first: wrong list... for example you have the output in an array called $lines... then the code should be: for ($i=0; $i < count($lines); $i++) { list ($field, $value) = split(":", $lines[$i]); $field = str_replace("", "", $field); ${"$field"} = trim($value); } regards... Tibor

[PHP-DB] preg_match_all

2003-03-04 Thread Lars Rasmussen
Hi All, Well i need a little help as allways. Lets say that i have this output: -- field1: value1 field2: value2 somefield: somevalue -- I want the value in between and this ": " and the value between ": " and \n So that i

RE: [PHP-DB] Update MD5 field

2003-03-04 Thread Beverly Steiner
Daniela, Why do you want to keep a calculated field inside your database? -- Beverly Steiner [EMAIL PROTECTED] -Original Message- From: Dani Matielo [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 10:18 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Update MD5 fie

Re: [PHP-DB] date functions

2003-03-04 Thread 1LT John W. Holmes
> I want to use it in this function that i am creating (it's for a resteraunt > automated tips system, to work out how much tips each staff member is > entitled to. > > > function tips($weekstart){ > /* JUST BELOW HERE IS WHER

[PHP-DB] date functions

2003-03-04 Thread David Rice
I want to use it in this function that i am creating (it's for a resteraunt automated tips system, to work out how much tips each staff member is entitled to. function tips($weekstart){ /* JUST BELOW HERE IS WHE

Re: [PHP-DB] php and local printing

2003-03-04 Thread Mark
It dopesn't seem like you got an answer to this. To print locally, you'll need to use Jscript of something similar on the local end. I've only seen this work in IE, but I haven't looked into it too deeply. To print to the server, you'll probably need to shell out to the OS. HTH or at least starts

RE: [PHP-DB] date functions

2003-03-04 Thread Hutchins, Richard
Good stuff here. http://www.mysql.com/doc/en/Date_and_time_functions.html Check out the SELECT DATE_ADD section. That might be what you're looking for. HTH, Rich > -Original Message- > From: David Rice [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 04, 2003 9:36 AM > To: [EMAIL PROTEC

Re: [PHP-DB] date functions

2003-03-04 Thread 1LT John W. Holmes
> I am looking for a way to take a date stored in a mysql database... and find > out the date seven days later. > > how would i do this?! too easy... SELECT date_column + INTERVAL 7 DAY FROM your_table ... ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, vi

[PHP-DB] date functions

2003-03-04 Thread David Rice
I am looking for a way to take a date stored in a mysql database... and find out the date seven days later. how would i do this?! cheers, dave _ Chat online in real time with MSN Messenger http://messenger.msn.co.uk -- PHP Data

RE: [PHP-DB] Help with MySQL Logic

2003-03-04 Thread Rankin, Randy
Thanks to everyone for your help. I was able to work out the logic last night based on your fine suggestions and all is well! Thanks again. Randy > -Original Message- > From: "1LT John W. Holmes" <[EMAIL PROTECTED]> > Sent: Monday, March 03, 2003 10:30 AM > To: Rankin, Randy

[PHP-DB] Re: Mapping objects to tables: the actual database object

2003-03-04 Thread Manuel Lemos
Hello, On 03/03/2003 02:19 PM, Alexander Deruwe wrote: I'm investigating using PHP's OOP functionality instead of the traditional model to implement a project. I've been looking at information about mapping objects to tables, and have mostly found what In that case you may be interested in Metast