Re: [PHP] SQL Join query

2004-08-08 Thread Lenar Lõhmus
it won't return duplicate data. And probable overhead is eliminated too I think - DBserver will optimize and will join data from pic_comments only once for each unique pics.id. Lenar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SQL Join query

2004-08-07 Thread Lenar Lõhmus
ount(*) AS num_comments FROM pics LEFT JOIN pic_comments ON (pic_comments.pic_id = pics.id) WHERE pics.category = 1 GROUP BY pics.pic_id; Lenar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Using Array of classes as a class member variable?

2001-10-05 Thread Lenar
Maybe: > First some basic questions: > (1) Can you create an unitialised array ? $an_array = array(); > (2) Can an unitinialised array be a class member variable ? > > My problem is this: > > I have a class called "user" - which represents one row in a mySQL table > (also called user) > class us

Re: [PHP] search array for value

2001-07-31 Thread Lenar
nd in array. array_search returns the key of matching element, FALSE otherwise. Lenar > for ($i = 0; $i < count($array); $i++) > { > if ($array[$i] == 1) { > //do something > exit; > } > } > -- PHP General Mailing List (http://www.php

RE: [PHP] html form question

2001-07-26 Thread Lenar Lõhmus
sql_result? Nope, instead you can do smething like this: $colval\n"; ?> Lenar > > mysql_connect("db", $user, $password); > $result = mysql_query( "SELECT * FROM $table"); > > while(list($field) = mysql_fetch_column($result)) > {

Re: [PHP] html form question

2001-07-26 Thread Lenar
> Funny you should ask - just done it myself: Why you use mysql_result function? This can be done a bit simpler way (and more effective): $event\n"; ?> Lenar > >$table="shoots"; > require ("connect.php4"); > $result=MYSQL_QUERY( &qu

[PHP] Re: Avoiding repost

2001-07-26 Thread Lenar
Put your "thank you" on another page. Then after processing your post data, instead outputting "thank you" do: header("Location: http://youthost/thankyoupage.php";); die(); That should do it. Lenar "Ashley M. Kirchner" <[EMAIL PROTECTED]> w

Re: [PHP] php not working

2001-06-24 Thread lenar
php.exe he's using redhat ... so there might be a _very_good_ possibility that he doesn't have php.exe laying around. lenar. ""Jason Lustig"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >I've

Re: [PHP] Get the value of a

2001-06-24 Thread lenar
if you really have to you can do smth like this: but i don't see the point of it :) lenar. ""Augusto Cesar Castoldi"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I always use "InputImageName_x > 0&qu

Re: [PHP] filemtime function not working

2001-06-24 Thread lenar
""lenar"" <[EMAIL PROTECTED]> wrote in message 9h5itc$hir$[EMAIL PROTECTED]">news:9h5itc$hir$[EMAIL PROTECTED]... > because $LastMod == 0 .. I assume your timezone is GMT-6 ? correction - it returns false in this case, which gets converted to 0 in date() whi

Re: [PHP] filemtime function not working

2001-06-24 Thread lenar
because $LastMod == 0 .. I assume your timezone is GMT-6 ? This is because that file doesn't exist or you don't have permissions for it or something like that. lenar. "Carmen & Gene" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAI

Re: [PHP] PHP 4.07-dev + Apache 2.0.19-dev

2001-06-24 Thread lenar
Do you have: SetOutputFilter PHP SetInputFilter PHP or something similar in your httpd.conf? lenar. ""Gonyou, Austin"" <[EMAIL PROTECTED]> wrote in message 85063BBE668FD411944400D0B744267A481AD4@AUSMAIL">news:85063BBE668FD411944400D0B744267A481A

Re: Re[2]: [PHP] php as cron

2001-06-22 Thread lenar
o/script.php This might be more useful: * * * * * php -q /var/www/path/to/script.php It surpresses those HTML headers that you propably don't want in shell mode. lenar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: [PHP] SQL statement for clearing a table

2001-06-22 Thread lenar
DELETE FROM tablename or TRUNCATE TABLE tablename lenar. ""Wilbert Enserink"" <[EMAIL PROTECTED]> wrote in message 001101c0fb15$5daa49e0$[EMAIL PROTECTED]">news:001101c0fb15$5daa49e0$[EMAIL PROTECTED]... > Hi all, > > anybody knows the mysql sta

Re: [PHP] PHP no longer logging errors - found them!

2001-06-21 Thread lenar
lay_errors 1 > php_value log_errors 1 As they logically should. > > regards > Jeff lenar -- 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]

Re: [PHP] Posting form variables with http authentication

2001-06-21 Thread lenar
I think there is no very simple way to do this. But you can try to receive the form yourself and using for example curl extension, make connection to that another server, then resubmitting your form data along with necessary authentication headers. That should work. lenar. ""Gera

Re: [PHP] redirect from aframe to the whole page!

2001-06-21 Thread lenar
This is not PHP related, but use '_top' as TARGET. lenar. ""kaab kaoutar"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi! > how cann i redirect from a frame to a page but in the whole page

Re: [PHP] List of included file names

2001-06-21 Thread lenar
use get_included_files() and/or get_required_files() functions. lenar. "DAve Goodrich" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > -Original Message- > > From: Tim McGuire [mailto:[EMAIL PROTECTED]] >

Re: [PHP] resource ID?

2001-06-21 Thread lenar
heh, that basically means that query was ok at least techincally. When you echo that $result and get nothing - then something went wrong. The right way to check if query was ok is: if(is_resource($result)) echo "Query OK"; or just: if($result) echo "Query OK";

Re: [PHP] Apache config + PHP include paths

2001-06-21 Thread lenar
in your virtualhost definition use: php_value include_path "new include path" might be that instead of php_value you have to use php_admin_value, not sure. this is explained in "Chapter 3. Configuration" of php manual. lenar. ""Butler, Shaun"&qu

Re: [PHP] php as cron

2001-06-21 Thread lenar
You have global variables $argc (count of arguments) and $argv (array containing arguments given on command line) lenar. ""Joseph Tate"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Have you tried 'php '? No

Re: [PHP] setcookie() woes

2001-06-20 Thread Lenar Lõhmus
e are many more than just IE or Netscape and their fifferent versions). I remember for example that one browser needed domain name to work and other didn't want it all to work. Or something like that. Hope this helps. lenar. ps. I think setcookie() itself doesn't woe, just our great pr

Re: [PHP] Trimming Array value

2001-06-20 Thread Lenar Lõhmus
something like this: $val) $ar[$key] = is_array($val) ? recursive_rtrim($val) : rtrim($val); return $ar; } ?> lenar. ""Reuben D Budiardja"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a multi-di

Re: [PHP] Parse PHP inside a variable

2001-06-20 Thread Lenar Lõhmus
maybe function eval()? lenar. "Claus Heiko Niesen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello > > I'm having a variable that contains HTML with embedded PHP code. When I > echo it then the PHP code doe

Re: [PHP] Code check please

2001-06-20 Thread Lenar Lõhmus
UPDATE syntax for INSERT is allowed in MySQL, so that should not be the problem as far as you include all fields not having default value, timestamp type or auto_increment attribute in your statement. What's the error message if there is any? lenar ""Rich Cavanaugh""

Re: [PHP] a DOT or a BLANK SPACE

2001-06-20 Thread Lenar Lohmus
_VARS[] array? I see now purpose of those names being replaced for this array only when they are populated as global variables. And still .. are you sure your webbrowser doesn't do that before t even makes to php? Lenar ""Jaime Torres"" <[EMAIL PROTECTED]> wrot

Re: [PHP] parent and grandparent member functions

2001-06-20 Thread Lenar Lõhmus
ss names. and thank you scott pointing me out (and getting me confused :) ). lenar. "scott [gts]"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > it looks like your solution *is* elegant... i tried > out your code, becuase i w

[PHP] parent and grandparent member functions

2001-06-20 Thread Lenar Lõhmus
n and it is way more useful than php's way. is there any elegant soultion(s) to my problem? Lenar Lõhmus