Re: [PHP-DB] Generate Menu based on database structure

2004-10-06 Thread graeme
Hi, Rather than writing a recursive function I'd suggest that you create a menu class and store each record as an object of the class. The menu class will have variables of id, parent, title, children, and tree. The children will be initialised to 0 and tree will be initialised to 1. You will

[PHP-DB] Convert a SQL compliant date to Epoc Unix seconds

2004-10-06 Thread Stéphane Pinel
Hello, Sorry if the question has already been posted, I checked the archives and didn't find anything related. I'm looking for a simple way to convert a SQL compliant date (eg 2004-09-06) into a Unix Epoc seconds (similar to the one returned by function time()). Thanks. Stephane -- PHP

Re: [PHP-DB] Convert a SQL compliant date to Epoc Unix seconds

2004-10-06 Thread John Holmes
Stphane Pinel wrote: I'm looking for a simple way to convert a SQL compliant date (eg 2004-09-06) into a Unix Epoc seconds (similar to the one returned by function time()). strtotime() or the database may have something you can use in your query (like UNIX_TIMESTAMP() in MySQL). -- ---John

[PHP-DB] HTML stored in a text field

2004-10-06 Thread Gabe Covert
I have a database which has a BLOB field storing text... It should probably be in a text field, but I don't think that's the problem... The field has HTML control codes, such as b, /b, and p. When I echo them from the database, a la: echo td . $row['textfield'] . /td I get the contents of the

Re: [PHP-DB] HTML stored in a text field

2004-10-06 Thread Jonathan Haddad
Gabe Covert wrote: I have a database which has a BLOB field storing text... It should probably be in a text field, but I don't think that's the problem... The field has HTML control codes, such as b, /b, and p. When I echo them from the database, a la: echo td . $row['textfield'] . /td I get the

[PHP-DB] Session confusion

2004-10-06 Thread Stuart Felenstein
Back to my multi page form again ;) I am going to try it with Session variables . So, one thing is confusing me. The page requires the user to be logged in and is being tracked via authentication. Do I still need to do a session_start();, at the beginning of the form process ? Stuart -- PHP

Re: [PHP-DB] HTML stored in a text field

2004-10-06 Thread John Holmes
Gabe Covert wrote: I have a database which has a BLOB field storing text... It should probably be in a text field, but I don't think that's the problem... The field has HTML control codes, such as b, /b, and p. When I echo them from the database, a la: echo td . $row['textfield'] . /td I get the

RE: [PHP-DB] Recursively determine parent records?

2004-10-06 Thread Chris Gregors
Here's a piece of some code I wrote that does what you want. You'll need to change the WhoIsMyParent() function to match your database abstraction and schema. $array = BreadCrumbs($id); print_r($array); exit; function BreadCrumbs($parent) { // construct an array of indexes that

[PHP-DB] Re: Session confusion

2004-10-06 Thread Aaron Todd
Stuart, I am fairly new to PHP, but it is my understanding that you have to run the session_start() command on every page that you want to be part of the session and to access the session variables. Here is a link of a tutorial about using sessions: http://www.phpfreaks.com/tutorials/41/3.php

Re: [PHP-DB] Database Backup

2004-10-06 Thread Aaron Todd
Andrew, I like the idea of using the crontab even though I have never used it before. I guess the first thing I need to do is make my script. Thanks for the link to mysqldump, I think it will be usefull. Do you happen to know how I might be able to push a file to another server using FTP?

Re: [PHP-DB] Re: Session confusion

2004-10-06 Thread Stuart Felenstein
Okay, I will read the tutorial. I also want to clarify a bit more. I guess it's my intention to not have the form session relying on the auth session, since I want to expire the form session , either at the end of the transaction or if user cancel out on the form. So either the cookie or

[PHP-DB] code example to store PHP session data in mySQL ?

2004-10-06 Thread Kalle
Hi @ all, where can I find a working example that shows me how to implement PHPSESSION with MySQL as stor? tia -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] code example to store PHP session data in mySQL ?

2004-10-06 Thread Matt M.
where can I find a working example that shows me how to implement PHPSESSION with MySQL as stor? i know adodb has session functions, download it a nd take a look maybe here http://www.devarticles.com/c/a/MySQL/Developing-Custom-PHP-Sessions/ also try google. -- PHP Database Mailing List

Re: [PHP-DB] Database Backup

2004-10-06 Thread Andrew Kreps
On Wed, 6 Oct 2004 15:31:34 -0400, Aaron Todd [EMAIL PROTECTED] wrote: Do you happen to know how I might be able to push a file to another server using FTP? I might http://us4.php.net/ftp has a list of all the FTP related PHP functions with some ready-to-use examples. Enjoy! -- PHP