[SQL] get branches & childs from database

2004-12-17 Thread Marcus Krause
Hello newsgroup! I'm trying to build up a menu by sending ONE query to database. Afterwards the result is used by PEAR::HTML_Menu get a html-structered menu. db-structure of gallery: ++---+--+--++---+ | id | title | date | root | parent | level | ++---+--+-

[SQL] Problem with a "blocking period" Trigger

2004-05-03 Thread Marcus Krause
Since some days i've been working on a "blocking period" trigger. Before customer's login data will be checked, the system should be look, if there's set a timetook-FIELD(TIMESTAMP) in the future. Then, login trial will be denied! Besides, if login fails due to wrong login data, a loginattempts-FIE

Re: [SQL] No output while using PEAR DB & formatted time-string

2003-11-08 Thread Marcus Krause
Am 01.11.2003 12:00 meinte Marcus Krause: > $query .= "SELECT news_id,to_char(news_time,'DD.MM. HH24:MI'), "; The real code is without the comma at the end of the line above, so it's not a simple SQL-Statement problem!

[SQL] No output while using PEAR DB & formatted time-string

2003-11-08 Thread Marcus Krause
I have a problem in using the to_char function in a SQL-Statement and addressing it with DB_FETCHMODE_OBJECT under PEAR DB. The follwing code is working fine unless I'm adding the to_char function: -- require_once 'DB.php'; $dsn = $$$; $