Re: [PHP] SQL Join query

2004-08-08 Thread Lenar Lõhmus
. 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
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 userBag {

Re: [PHP] search array for value

2001-07-31 Thread Lenar
. Lenar for ($i = 0; $i count($array); $i++) { if ($array[$i] == 1) { //do something exit; } } -- 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

[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] wrote in message [EMAIL PROTECTED]">news:[EMAIL P

Re: [PHP] html form question

2001-07-26 Thread Lenar
)) echo option$event/option\n; ? Lenar ?php $table=shoots; require (connect.php4); $result=MYSQL_QUERY( SELECT eventName FROM $table); $num_rows = mysql_num_rows($result); for ($i=0;$i$num_rows;$i++) { echo option; echo mysql_result($result,$i,eventName); echo

RE: [PHP] html form question

2001-07-26 Thread Lenar Lhmus
do smething like this: ?php mysql_connect(db, $user, $password); $result = mysql_query( SELECT * FROM $table); while($row = mysql_fetch_assoc($result)) while(list($colname, $colval) = each($row)) echo option value=\$colname\$colval/option\n; ? Lenar ?php

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

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

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:[EMAIL PROTECTED]... Can anyone out there

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() which in turn returns seconds from un

Re: [PHP] Get the value of a input type=image...

2001-06-24 Thread lenar
if you really have to you can do smth like this: input type=image name=contatc src=. input type=hidden name=contatc value=002545645 but i don't see the point of it :) lenar. Augusto Cesar Castoldi [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

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 added the lines: AddType application/x-httpd-

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 statement for clearing the contents of

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

2001-06-22 Thread lenar
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-mail: [EMAIL PROTECTED

Re: [PHP] setcookie() woes

2001-06-21 Thread Lenar Lõhmus
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 programmers at netsacpe

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 FILENAME'? Now, I don't know how you would pass pa

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 [EMAIL PROTECTED] wrote in message 0106240506.10472

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; lenar. Kurth Bemis [EMAIL

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]] Sent: Tuesday, June 19, 2001 2:30 PM To

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 ! i mean like href an

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. Gerard Onorato

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

2001-06-21 Thread lenar
cause since they are boolean values you need to use php_flag instead of php_value: php_flag display_errors on php_flag log_errors on This doesnt work! The following does work though: php_value display_errors 1 php_value log_errors 1 As they logically should. regards

[PHP] parent and grandparent member functions

2001-06-20 Thread Lenar Lõhmus
soultion(s) to my problem? Lenar Lõhmus

Re: [PHP] parent and grandparent member functions

2001-06-20 Thread Lenar Lõhmus
it works correctly, i have to hardcode class 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, b

Re: [PHP] a DOT or a BLANK SPACE

2001-06-20 Thread Lenar Lohmus
[] 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] wrote in message [EMAIL PROTECTED]">new

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 [EMAIL PROTECTED] wrote

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 does not get executed. Is there a way I can par

Re: [PHP] Trimming Array value

2001-06-20 Thread Lenar Lõhmus
something like this: ? function recursive_rtrim($ar) { foreach($ar as $key = $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]...