[PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?

2002-01-13 Thread Sander Peters

Hello everybody,

convert /mm/dd to mm/dd/, how?

MYSQL does everything in /mm/dd.
I live in the Netherlands and we are use to the format dd/mm/.

What's the best way to display it as mm/dd/ in a table on a query?

My first idea whas to split the date up in vars in php and then print
the vars in the way I like it
Is this a bad idea? Or are there better sollutions?

Thanx in advance for answering!



--
Met vriendelijke groet / With Greetings,

Sander Peters

   site: http://www.visionnet.nl/
  email: mailto:[EMAIL PROTECTED]
webmail: mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] counting with dates (help!)

2002-01-07 Thread Sander Peters

Hello,


This is my problem:

$today = date(Ymd, mktime(0,0,0, date(m),date(d),date(Y)));
$last_week = date(Ymd, mktime(0,0,0, date(m),date(d)-7,date(Y)));
echo ($today - $last_week);
The result is a number like 8876 (20020107-20011231 = 8876)
But in date thinking it should be 7!

How can I let php count in real days/month/years in stead of numbers?

Maybe this is a silly question, but anyone who has the answer would help
me very much!

Thanks in advance!


--
Met vriendelijke groet / With Greetings,

Sander Peters

   site: http://www.visionnet.nl/
  email: mailto:[EMAIL PROTECTED]
webmail: mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] how to create html tables in php

2001-12-29 Thread Sander Peters

Hello,

I made a database with bookmarks, these bookmarks are catogarized by
type.
Now I want to display those bookmarks in tables by category. This works
already fine.
The only problem I have is that the tables are very difficult to handle.

I want to make 4 tables in a row (so that will be 4 dif categories with
bookmarks) and after that, the next table should start under the first
one.
Like this

categorycategorycategorycategory
xxx xxxxxx xxx
xxx xxxxxx xxx
xxx xxxxxx xxx

categorycategorycategorycategory
xxx xxxxxx xxx
xxx xxxxxx xxx
xxx xxxxxx xxx


(x = a weblink ;-)

The (dutch)  website where you can find a full example for what I mean:
http://www.startpagina.nl/

Can anyone help me with this please?

Thanx!

--
Met vriendelijke groet / With Greetings,

Sander Peters

   site: http://www.visionnet.nl/
  email: mailto:[EMAIL PROTECTED]
webmail: mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] variable operators in queries

2001-10-19 Thread Sander Peters

Hello,

Is it possible to put variable operators in queries?
I tried this (the real variable comes from a form)

$Date_Operator =(=);

sql=SELECT * FROM poeple WHERE age $Date_operator 20;
$result_id = mysql_query($sql);

It doesn't work like this. I also tried:

sql=SELECT * FROM poeple WHERE age \$Date_operator\ 20
$result_id = mysql_query($sql);

it didn't work either.

Or should I use a have to make a IF-Then construction?

If $Date_Operator == (=)
then
{
sql=SELECT * FROM poeple WHERE age = 20
}
etc...




Can anybody help me with this?

Thanks in advance!
--
Met vriendelijke groet / With Greetings,

Sander Peters

   site: http://www.visionnet.nl/
  email: mailto:[EMAIL PROTECTED]
webmail: mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]