Re: [PHP-DB] [Regular expression] Format string to DD/MM/YYYY hh:mm

2006-03-30 Thread Balazs Hegedus
Hi, this regex isn't perfect at all but might do the job. You should modify the pattern to match the year part against 2037 as a maximum and also don't forget to checkdate(). ?php $date = '30/03/2983 12:00'; $pattern = '[0-3][0-9]/[0|1][0-9]/[1|2][0-9]{3,3}\s[0-2][0-9]:[0-5][0-9]';

Re: [PHP-DB] [Regular expression] Format string to DD/MM/YYYY hh:mm

2006-03-30 Thread Balazs Hegedus
Oops, \s matches any whitespace character, so if you need only space there you should change \s to space (this way it matches tab too). Balazs 2006/3/31, Balazs Hegedus [EMAIL PROTECTED]: Hi, this regex isn't perfect at all but might do the job. You should modify the pattern to match

Re: [PHP-DB] Cannot connect to MySQL using

2006-03-29 Thread Balazs Hegedus
Hi, did you try to grant the IP address? I mean: grant x,y,z on db_name.{table_name|*} to [EMAIL PROTECTED] identified by 'password'; Hope it helps, cheers, Balazs -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] How to put content of databasefield into an array

2006-02-07 Thread Balazs Hegedus
Hi, 2006/2/7, Ruprecht Helms [EMAIL PROTECTED]: Hi, how can I put the content of a databasefield into a array. It depends on what kind of database server you are using. If you are using MySQL you will need http://www.php.net/mysql . It is a good starting point. BTW you may want to take a look

Re: [PHP-DB] Scriptproblem

2006-01-24 Thread Balazs Hegedus
Hi, Actually you have an undefined variable called $row which is in this context ($row-Vorname) is an object...but $row has nor content neither type. I think you'd better use arrays...in this way: (according to the PHP manual mysql_db_query() is decrepated) ?php $link = mysql_connect(_host_,

Re: [PHP-DB] new guy with stupid question

2006-01-20 Thread Balazs Hegedus
Hi, Here's what I found googling around (with these keywords: html email php): http://www.sitepoint.com/article/advanced-email-php didn't read it through, but looks good imho (and there's more). And my apologies but I really don't understand your second question. :) Balazs -- PHP Database

Re: [PHP-DB] new guy with stupid question

2006-01-20 Thread Balazs Hegedus
Hi, Aaron helped me to understand the question so here's an add-in to his comment. ?php if ($_SERVER['REQUEST_METHOD'] === 'GET') {//'GET' !== 'get' //display form (using POST method) } elseif ($_SERVER['REQUEST_METHOD'] === 'POST' isset($_POST['_non-optional_fields_'])

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