[PHP-DB] Add or Subtract

2006-01-19 Thread Ed
I've been considering doing a little project for my community site which allow people to sell and buy players ... They would have a limit of 2,000,000 upon sign up .. However i'm not sure how i'd update this figure Say player sells for example Alan Shearer for £300,000 he'd then have

Re: [PHP-DB] Add or Subtract

2006-01-19 Thread David Robley
On Thu, 19 Jan 2006 22:55, Ed wrote: I've been considering doing a little project for my community site which allow people to sell and buy players ... They would have a limit of 2,000,000 upon sign up .. However i'm not sure how i'd update this figure Say player sells for example Alan

Re: [PHP-DB] Add or Subtract

2006-01-19 Thread Julien Bonastre
Thats not even a docs question.. Thats a have you ever even sat down at a single teaching of SQL principles or read ANY basic SQL material at all question. Really man. UPDATE is one of the four most common SQL standard functions you will and should know quite well. SELECT, INSERT,

[PHP-DB] Date Time 90 minutes ago

2006-01-19 Thread Ron Piggott (PHP)
Would someone be able to help me with the DATE command syntax to know what the date and time was 90 minutes ago? I am trying to assign these values into two variables: $date_90_minutes_ago $time_90_minutes_ago I am not sure how to handle midnight where if the time is 00:10:00 ninety minutes

RE: [PHP-DB] Date Time 90 minutes ago

2006-01-19 Thread Bastien Koert
?php echo date(Y-m-d H:i:s,strtotime(90 minutes ago)); ? bastien From: Ron Piggott (PHP) [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: PHP DB php-db@lists.php.net Subject: [PHP-DB] Date Time 90 minutes ago Date: Thu, 19 Jan 2006 16:57:33 -0500 Would someone be able to help me with the

Re: [PHP-DB] Date Time 90 minutes ago

2006-01-19 Thread Cal Evans
$date_90_minutes_ago = date('m/d/Y',mktime()-(60*90)); $time_90_minutes_ago = date('h:i:s',mktime()-(60*90)); 60 seconds * 90 minutes. =C= | | Cal Evans | http://www.calevans.com | | We get our best customers from referrals. | We would appreciate you referring any of your | friends or co-workers

Re: [PHP-DB] How can I solve this?

2006-01-19 Thread Jeremy Peterson
A friend of mine updated your regular expression... Check it out if your interested. Jeremy Dear Jeremy, Thanks for writing! I saw this regular expression and thought you might like it... :) preg_replace(/^\/?(.*)\/[\w]+\.php$/,$1,$PHP_SELF) that strips that leading forward slash

RE: [PHP-DB] Date Time 90 minutes ago

2006-01-19 Thread tg-php
Bastien's example is probably the quickest and easiest. I just wanted to point out that you can use math within the mktime() function as well in case the relative date/time you need isn't right now. $month = 1; $day = 19; $year = 2006; $hour = 17; $minute = 08; $second = 05; echo date(Y-m-d

[PHP-DB] Storing money values in MySQL

2006-01-19 Thread tg-php
Again.. your forgiveness. This is a MySQL question. If the MySQL mailing lists would include a [MySQL Help] tag in their subject lines, I'd use them. What I receive from them is difficult to distinguish from spam half the time so I gave up. We had a problem a few months ago and now I can't

Re: [PHP-DB] Storing money values in MySQL

2006-01-19 Thread Balazs Hegedus
Hi, from the MySQL 4.1 manual: --- The DECIMAL and NUMERIC data types are used to store exact numeric data values. In MySQL, NUMERIC is implemented as DECIMAL. These types are used to store values for which it is important to preserve exact precision, for example with monetary data. --- and there

Re: [PHP-DB] Storing money values in MySQL

2006-01-19 Thread Balazs Hegedus
Me again, Sorry for the rtfm stuff, I googled around and found this: http://bugs.mysql.com/bug.php?id=10719 and another thing, maybe worth a try; MySQL stores decimal numbers as strings...did you try to input decimals as string? I mean not: UPDATE SomeTable SET AmtOwed = 10.74 but: UPDATE

[PHP-DB] Getting PHP 5 w/mysqli to communicate with MySQL 5

2006-01-19 Thread Allen Schultz
Hi, all: I having trouble getting my php to communicate with my MySQL database. I have it where I can connect, but afterwards, it sees nothing for information after being connected. Any suggestions will help. Thanks, Allen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] How can I solve this?

2006-01-19 Thread Julien Bonastre
Thank you, In fact, its called busy-ness, and I tend to believe I have quite a prowess in the was of Regular Expressions. Reason I have the character class? You betchya! So I could do exactly what your friend did. Reason I completely forgot? I'm an idiot and was too busy replying to 3

RE: [PHP-DB] Getting PHP 5 w/mysqli to communicate with MySQL 5

2006-01-19 Thread Bastien Koert
code versions of mysql and any error messages would help too bastien From: Allen Schultz [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Getting PHP 5 w/mysqli to communicate with MySQL 5 Date: Thu, 19 Jan 2006 17:16:03 -0700 Hi, all: I having trouble getting my php to

Re: [PHP-DB] Getting PHP 5 w/mysqli to communicate with MySQL 5

2006-01-19 Thread Julien Bonastre
Without some good information I'm going to take a stab in the dark here.. You are using the mysqli functions right? Not the older mysql ones for mysql4.x and older?? If you only compiled php with the mysqli libraries then you need to use them You can connect in some fashions to mysql5