Re: [PHP-DB] Join on single table

2005-02-11 Thread Martin Norland
Matthew Weier O'Phinney wrote: I have a table which contains the following: id (primary key, auto incrementing) app_id (integer, foreign key) resource_id (integer, foreign key) word score (This is a search index.) I want to find all resource_ids from one app_id that match

[PHP-DB] Excel headers not working anymore

2005-02-11 Thread Perry, Matthew (Fire Marshal's Office)
Good morning, I have been using PHP4.1, Apache, and MySQL for a few years now and have never had a problem with my Excel headers. When I want to output html to Excel I place the following on the top of the page: ?header (Content-type: application/vnd.ms-excel); header (Content-Disposition:

Re: [PHP-DB] Join on single table

2005-02-11 Thread Matthew Weier O'Phinney
* Martin Norland [EMAIL PROTECTED]: Matthew Weier O'Phinney wrote: I have a table which contains the following: id (primary key, auto incrementing) app_id (integer, foreign key) resource_id (integer, foreign key) word score (This is a search index.) I want to

Re: [PHP-DB] Excel headers not working anymore

2005-02-11 Thread Martin Norland
Perry, Matthew (Fire Marshal's Office) wrote: Good morning, I have been using PHP4.1, Apache, and MySQL for a few years now and have never had a problem with my Excel headers. When I want to output html to Excel I place the following on the top of the page: ?header (Content-type:

RE: [PHP-DB] Store $_SESSION in MySQL table

2005-02-11 Thread Bastien Koert
serialize the array before insertion and unserliaze it when you retreive it from the db bastien From: [EMAIL PROTECTED] To: php-db@lists.php.net (PHP) Subject: [PHP-DB] Store $_SESSION in MySQL table Date: Fri, 11 Feb 2005 17:25:34 + Greetings all. While trying to create a session-based

Re: [PHP-DB] Store $_SESSION in MySQL table

2005-02-11 Thread Martin Norland
[EMAIL PROTECTED] wrote: Greetings all. While trying to create a session-based advertising model that does not rely on the existence of cookies, I ran into trouble: I can't figure out how to place the entire $_SESSION array into a MySQL table row, then retrieve it and use the information from

RE: [PHP-DB] Excel headers not working anymore

2005-02-11 Thread Perry, Matthew (Fire Marshal's Office)
Wow! Removing the file that controlled the session array fixed the problem (suggestion 2). I was using ssl and session data and would never have guessed it would trip things up. I would have stared at this problem for weeks and probably not have solved the problem. Also I will change my code to

Re: [PHP-DB] Join on single table

2005-02-11 Thread Matthew Weier O'Phinney
* Micah Stevens [EMAIL PROTECTED]: Sounds like a self join should work wonders. I didn't test this, but the idea should work: select t1.app_id as a1, t2.app_id as a2, t2.word, t2.score from tablename as t1 left join tablename as t2 on t1.resource_id = t2.resource_id and t1.app_id !=

Re: [PHP-DB] Excel headers not working anymore

2005-02-11 Thread Martin Norland
Perry, Matthew (Fire Marshal's Office) wrote: Wow! Removing the file that controlled the session array fixed the problem (suggestion 2). I was using ssl and session data and would never have guessed it would trip things up. I would have stared at this problem for weeks and probably not have

[PHP-DB] issue with accents from a mysql table

2005-02-11 Thread mario
Hello, please help me on the following issue. I guess I should understand by myself, but I don`t. I have hacked a function accents_conv(---); to convert a character like à to, say, agrave;. When I feed it by a string - accents_textris('à') - it works fine. The issue is when I get 'à' from a

Re: [PHP-DB] Join on single table

2005-02-11 Thread Micah Stevens
What kind of speed do you need? I had to go to temp tables for a logging application, but not until my table got upwards of a million records or so.. For the numbers your quoting, it should be pretty quick unless your engine needs optimization.. On Friday 11 February 2005 11:56 am, Matthew