[PHP-DB] inserting due date into database

2006-01-04 Thread Ruprecht Helms
Hi, how can I calculate the due date from the date of an invoice and insert the result into a mysql-database. The daydifference is 14 days. Actualy I have tried something with mktimes, but I only get the timestamp of the due date. I have troubles to write that into a dabasefield that was set

Re: [PHP-DB] inserting due date into database

2006-01-04 Thread David Robley
On Wed, 4 Jan 2006 07:37, Ruprecht Helms wrote: Hi, how can I calculate the due date from the date of an invoice and insert the result into a mysql-database. The daydifference is 14 days. Actualy I have tried something with mktimes, but I only get the timestamp of the due date. I have

[PHP-DB] Ms Sql stored procedures with parameters

2006-01-04 Thread meska
Hi, I've done it in various ways, still, no luck.. Lets say i have a stored procedure getSomeCoolData declared as : [getSomeCoolData] @prodCode char(255), @prodName nvarchar(255), @prodID int = NULL This stored procedure returns products based on parameters i pass. So let's say i do like this

Re: [PHP-DB] inserting due date into database

2006-01-04 Thread Amos Glenn
php.net says: date ( string format [, int timestamp] ) To turn a php timestamp into something that will be recognized by the mysql DATE type, you might try this: ?php $due_date= //however you set up you invoice+14days timestamp $mysql_date = date(Y-m-d,$due_date);// makes a string like

Re: [PHP-DB] Ms Sql stored procedures with parameters

2006-01-04 Thread Robert Twitty
Hane you tried $result = mssql_query(EXEC getSomeCoolData '061451221', NULL, NULL ); Also, did you try mssql_init()? -- bob On Wed, 4 Jan 2006, meska wrote: Hi, I've done it in various ways, still, no luck.. Lets say i have a stored procedure getSomeCoolData declared as :

Re: [PHP-DB] inserting due date into database

2006-01-04 Thread Miles Thompson
At 08:34 AM 1/4/2006, Amos Glenn wrote: php.net says: date ( string format [, int timestamp] ) To turn a php timestamp into something that will be recognized by the mysql DATE type, you might try this: ?php $due_date= //however you set up you invoice+14days timestamp $mysql_date =

[PHP-DB] CAnnot connect to a MySQL DB using a Class

2006-01-04 Thread Todd Cary
No doubt I am over looking something very simple, nevertheless I am baffled by not being able to connect to a MySQL DB. Here is the code that will use the Class: $host='192.168.0.12'; $user='todd'; $password='mypassword'; $database='calevent'; /*

[PHP-DB] Re: CAnnot connect to a MySQL DB using a Class

2006-01-04 Thread Todd Cary
Todd Cary wrote: No doubt I am over looking something very simple, nevertheless I am baffled by not being able to connect to a MySQL DB. Here is the code that will use the Class: $host='192.168.0.12'; $user='todd'; $password='mypassword'; $database='calevent'; /*

[PHP-DB] Fw: for help

2006-01-04 Thread Julien Bonastre
This guy is starting to get to me, I am a busy guy, I did give him some pointers, but I just DO not have the time to help and I DO not have the heart to say no.. He just wants a basic tutorial site for php beginners etc.. He comes from a VB/C++ background.. Thanks a million - Original