[PHP-DB] [plain SQL Problem] Group By

2003-05-29 Thread Sapporo
Hi, sorry if this is off topic. I hope you don't mind a plain SQL question here. I know I can do what I want using subqueries (I'm on Oracle9i here), but I would really like to avoid them for performance reasons. Here's my example data: DESC dept NameType

[PHP-DB] hotornot functionality

2003-05-29 Thread Matthew Horn
I am toying with the idea of implementing functionality similar to the hotornot.com site -- for a different purpose, mind you, but the same kind of user experience. Here's what it does: 1. A picture is served up. 2. User clicks on a radio button scale from 1 to 10 to rate the picture. 3. The

Re: [PHP-DB] hotornot functionality

2003-05-29 Thread Alex Harris
Why not have a field called last in the db? You set it equal to true for the last image and then check it for all of the images. If it's true, you just null the next option and the user can't go any farther. From: Matthew Horn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB]

RE: [PHP-DB] hotornot functionality

2003-05-29 Thread Snijders, Mark
i would do it totally different if i understand you right.. you start with row number one, show it, give it a rate, then show number 2, and show number 1 as last rated pic!!! then you have the problem of reaching the last record!! but !! i also see another problem: if you do row 1,2,3,4 you

Re: [PHP-DB] hotornot functionality

2003-05-29 Thread Mengü Gülmen
I think the best way is to use sessions. when the user comes to the site or he submits a rating, start a session and create a variable, in which you store the images' id that the user rated like $var=1,1423,523 etc.. then use it in your query mysql_query(select id from images where id not in

Re: [PHP-DB] printing with php

2003-05-29 Thread Ronan Chilvers
Crikey !! However, this is still server-side, and the impression I got was that the printing was going to be client-side. I may be wrong though, in which case, this seems to do the trick just fine BTW, its also on the PHP site ... printer module. Ronan e: [EMAIL PROTECTED] t: 01903 739

Re: [PHP-DB] [plain SQL Problem] Group By

2003-05-29 Thread Alexandre Florio
Em Wed, 28 May 2003 14:54:19 +0200 Sapporo [EMAIL PROTECTED] escreveu: Hi, sorry if this is off topic. I hope you don't mind a plain SQL question here. Maybe this works... SELECT D.dept_name, MIN(E1.emp_age) AS YOUNGEST_AGE, MAX(E2.emp_age) AS OLDEST_AGE, E1.emp_name AS

[PHP-DB] Re: ODBC driver for ORACLE

2003-05-29 Thread Dave Smith
Alain Barbu wrote: Hi, Is there any free ODBC Driver for ORACLE 9i to use with PHP, APACHE, LINUX ? Regards Alain The Oracle Client software includes a perfectly good ODBC driver. If you install the client it will be included. -- Dave Smith [EMAIL PROTECTED] -- PHP Database Mailing

Re: [PHP-DB] hotornot functionality

2003-05-29 Thread Peter Beckman
Uh, why not just do this: input type='hidden' name='lastid' value='1930' Then on the next page, you can get the id. Or geez, it's gonna be there anyway -- after you do the insert/update of your vote, just pass that ID to the function that displays the page. function display($x) { if

[PHP-DB] Re: printing with php

2003-05-29 Thread David
Here it is in English. You will find it in the PHP manual. To get a copy of the help go to http://weblabor.hu/php-doc-chm/ Dave Anagram systems http://www.anagram-sys.co.uk/ printer_set_option Configure the printer connection () bool printer_set_option ( resource handle, int option, mixed

[PHP-DB] Email an attached file

2003-05-29 Thread Marie Osypian
I am using something like this example code below to send e-mail and wondered if anyone could tell me how I could include a file also in this email if possible. Thanks in advance. Marie EXAMPLE: $myname = Me Myself; $myemail = [EMAIL PROTECTED]; $contactname = Mister Contact; $contactemail =

Re: [PHP-DB] hotornot functionality

2003-05-29 Thread Becoming Digital
I agree with both Peter and Mengü, in a manner of speaking. Assuming you want visitors to return, I think it's best to use sessions and cookies so that they're not served the same image twice. Passing that information between pages is easy with Peter's method. Mengü's technique (albeit slightly

Re: [PHP-DB] Email an attached file

2003-05-29 Thread jeffrey_n_Dyke
www.phpclasses.org is your best bet. there are plenty. personally i use this one..http://phpclasses.com/browse.html/package/32.html check out his site for examples. hth jd

Re: [PHP-DB] Email an attached file

2003-05-29 Thread Dan Brunner
Hello!! If your storing the file name, file type, in mysql; and are storing the files on a server. (Which you should be doing!!!) You could use this!! // $query = SELECT * FROM Images WHERE Num = $num; $result = mysql_query ($query,

[PHP-DB] pg_fetch_result() get unexpectly trimmed

2003-05-29 Thread Bård Magnus Fauske
Take a look at the titles in this site (revision project of my bigbands site): http://studorg.nlh.no/storband/revisjon/vis.php An then, move up one folder, and hava look at the same on the current site: http://studorg.nlh.no/storband/vis.php To show the database-entries, I use code similar to

RE: [PHP-DB] Email an attached file

2003-05-29 Thread Marie Osypian
I am storing the file on my server. -Original Message- From: Dan Brunner [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 2:42 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Email an attached file Hello!! If your storing the file name, file type, in

[PHP-DB] mail() function

2003-05-29 Thread Alex Francis
I have set up my pc as a test server Windows 98 running Apache as a service, PHP and MySQL but cannot get the mail() function to work. After a long wait, I get an error Warning: Failed to Receive in c:\phpdev\www\assets\submit_users.php on line 17. Is there something I should be changing in the

Re: [PHP-DB] mail() function

2003-05-29 Thread Michael Scappa
Yehp, actually there is :-) On windows machines you'll need to change the SMTP in there (Since you probably aren't running a local mail server), in your php.ini you can most likely change it to your ISP's mail server., there is more specific info on the docs for the mail funcion in the php manual

Re: [PHP-DB] Email an attached file

2003-05-29 Thread Dan Brunner
Then you should be able to use that function... So are you storing the Path of the file in MYSQL or any other database?!?!!? If not then replace /- $file2 = (./images/$data-name); //-- to reflect your path... Dan On Wednesday, May 28, 2003, at 02:34 PM, [EMAIL PROTECTED]

[PHP-DB] Re: Email an attached file

2003-05-29 Thread Manuel Lemos
Hello, On 05/28/2003 03:08 PM, Marie Osypian wrote: I am using something like this example code below to send e-mail and wondered if anyone could tell me how I could include a file also in this email if possible. You need to use multipart/mixed MIME composed messages. You may want to try this

RE: [PHP-DB] connection pooling

2003-05-29 Thread Jennifer Goodie
Did you read the manual page? http://us4.php.net/manual/en/function.mysql-pconnect.php [quote]First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, username and password. If one is found, an identifier for it will be returned

Re[2]: [PHP-DB] connection pooling

2003-05-29 Thread Meng Glmen
of course I did, let me tell you how apache and php interact with php as far as I know: I'm using php set up as a module for apache. so apache handles each web page request and forwards the request to one of its threads (the thread count is set up from httpd.conf). the algorythm it uses is pretty

[PHP-DB] Re: connection pooling

2003-05-29 Thread Manuel Lemos
Hello, On 05/28/2003 06:20 PM, O îÏõ ¯õìo î wrote: I've been looking all over the net for connection pooling information about php and mysql but I didn't come across anything. Do you know anything like the connection pooling system of asp? In php, there is the pconnect, persistent connection

[PHP-DB] Multiple inserts revisited

2003-05-29 Thread Becoming Digital
The subject would lead you to believe that this is a check the archives post. Worry not, I already did. Besides, this is more informative than anything. I'm working on a catalogue (menu, really) admin page from which a client will set their daily specials. My design calls for the user to select

[PHP-DB] Operation must use an updateable query

2003-05-29 Thread Chad
I am using PHP 4.2.3 on a Window 2K Pro box with Service Pack 3 installed. I am trying to access an MS Access 2000 database through the MS Access ODBC driver. When I try to write to a table, using an INSERT INTO command (see below) I get the following error: Operation must use an updateable

[PHP-DB] Subject: Fread, fopen, problem with local file not recognized

2003-05-29 Thread Dewi Wahyuni
I am trying a script to upload an image the problem is the php does not recognize it as a local file The error I get is : error. File: ''. Warning: fopen(joey lim.jpg) [function.fopen]: failed to create stream: No such file or directory in /home/bus8646/www/tryout/upload.php on line 11 Warning:

Re: [PHP-DB] Firebird PHP Module (Repost)

2003-05-29 Thread Daniela Mariaschi
Julian Mesa [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I can compile doing 2 modifications, but doesn't work. I've had 2 modifications to compile interbase module of php: 1)in ibase.h add #define ISC_FAR 2) Before configure export LIBS=-lstdc++ -lcrypt -lcrypto configure

Re: [PHP-DB] Operation must use an updateable query

2003-05-29 Thread Ronan Chilvers
Hi Chad Make sure the webserver has write permissions on the Access database file. Cheers Ronan e: [EMAIL PROTECTED] t: 01903 739 997 w: www.thelittledot.com The Little Dot is a partnership of Ronan Chilvers and Giles Webberley On 28 May,2003 at 23:02 Chad Chad wrote: I am using PHP 4.2.3

RE: [PHP-DB] Multiple inserts revisited

2003-05-29 Thread Ford, Mike [LSS]
-Original Message- From: Becoming Digital [mailto:[EMAIL PROTECTED] Sent: 28 May 2003 23:38 My other option, as I saw it, was to loop through the items, appending value data to the query text with each iteration. If that seems cryptic, here's a basic idea of what I mean. ?

Re: [PHP-DB] Re: connection pooling

2003-05-29 Thread Meng Glmen
this really is what I was looking for, thanks a lot -- Finest, Mengü mailto:[EMAIL PROTECTED] ML Hello, ML On 05/28/2003 06:20 PM, O îÏõ ¯õìo î wrote: I've been looking all over the net for connection pooling information about php and mysql but I didn't come