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
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
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
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
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))
> {
> 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
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
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
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
""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
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
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
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
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
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]
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
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
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]]
>
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";
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
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
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
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
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
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""
_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
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
n
and it is way more useful than php's way.
is there any elegant soultion(s) to my problem?
Lenar Lõhmus
28 matches
Mail list logo