Michael J. Pawlowsky wrote:
Why not create a unique constraint with the userid, day (without time) and post content.
Is it going in a DB?
Index on text columns does not seem very efficient, IMHO.
If he wants to avoid multiple inserts, the random unique ID is enough.
--
PHP General Mailing Lis
Hi,
I'm dealing with the following issue:
how to determine whether the current page request has been responded
normally, eg. output has been sent to the browser as regular, or just a
redirection header sent to it header('Location: '); ?
Some words about the background:
This functinality would b
Hi,
I'm dealing with the following issue:
how to determine whether the current page request has been responded
normally, eg. output has been sent to the browser as regular, or just a
redirection header sent to it header('Location: '); ?
Some words about the background:
This functinality would
Jochen Kaechelin wrote:
Is there a free php accelerator out there which runs under Apache 2?
I don't know whether PHP Accelator depends on the version of Apache (I
mostly doubt it), but it's free and seems to be well maintained. Try it:
http://php-accelerator.co.uk/
gerzson
--
PHP General
it may be better:
array_walk($this->array, array(&$this, 'func1');
"Attila Strauss" <[EMAIL PROTECTED]> wrote in message
001d01c195db$67647da0$[EMAIL PROTECTED]">news:001d01c195db$67647da0$[EMAIL PROTECTED]...
| hi
|
| $this->func1();
|
|
| best regards
| attila
|
|
| >
| >
Hi,
if your script makes errors on mysql_query() try to printthe errormessages sent back
by MySql:
mysql_query(...) or die(mysql_error());
see: http://www.php.net/manual/en/function.mysql-error.php
- Original Message -
From: "Roman" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTE
Hi,
play with array_intersect or array_diff and some other array functions.
http://www.php.net/manual/en/function.array-intersect.php (PHP 4 >= 4.0.1)
http://www.php.net/manual/en/function.array-diff.php (PHP 4 >= 4.0.1)
- Original Message -
From: "Joe Rice" <[EMAIL PROTECTED]>
To: <[
Hello,
I think you need cURL extension for PHP.
visit this page to know more about cURL: http://curl.haxx.se
- Original Message -
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: 2001. augusztus 14. 19:17
Subject: [PHP] Using Sockets to connect
Hi,
clear that semicolon(;) after the while statement!
this makes the trick
- Original Message -
From: "PHP List" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: 2001. augusztus 15. 01:49
Subject: [PHP] Loop error?
Hi,
Can anyone tell me why this is a never ending loop?
$i=0;
- Original Message -
From: "Clayton Dukes" <[EMAIL PROTECTED]>
To: "Gyozo Papp" <[EMAIL PROTECTED]>; "Chad Day" <[EMAIL PROTECTED]>
Sent: 2001. június 29. 20:50
Subject: Re: [PHP] problems with round ..
> Hey,
> Could one of you do
This code works fine with PHP 4.0.5 on Win.
';
}
?>
- Original Message -
From: "Chad Day" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: 2001. június 27. 17:27
Subject: RE: [PHP] problems with round ..
> Yes, it is. I've tried it on a couple different php4 ser
date('l', mktime(0,0,0, $Month, $Day, $Year));
- Original Message -
From: "Tyler Longren" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: 2001. június 25. 16:58
Subject: [PHP] date -> day
> Hello,
>
> I have something like this:
> $Month = "6";
> $Year = "2001";
> $Dat
Hello,
since PHP 4.0RC1 there is a function what you really need callled:
array get_included_files (void)
which returns with the name of the included files.
For more detail, read the manual : LVII. PHP options & informations
Papp Gyozo
- [EMAIL PROTECTED]
- Original Message -
Hello,
an article was posted to Zend a few weeks ago its title was:
Mimic form submissions in PHP by John Coggeshall
"Learn how you can use PHP to simulate GET and POST form submissions from
within your PHP scripts."
and the URL:
http://www.zend.com/zend/spotlight/mimocsumissions.php
hope th
t; <[EMAIL PROTECTED]>
To: "Gyozo Papp" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: 2001. május 23. 00:14
Subject: Re: [PHP] select specified elements from an array
> On Wed, May 23, 2001 at 12:06:42AM +0200, Gyozo Papp wrote :
> > function array_part($fromar
hello,
I'd like to know if there is a more elegant and smoother way to retrieve some array
elements with given keys and put them into an other array.
Yes, I can write a function like the following, but maybe I missed some new PHP
awesome feature or array function which does this job.
So, is the
metacharacter.
- Original Message -
From: "Dennis Gearon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 22. 09:34
Subject: [PHP] regex
> Is a '.' inside of a [] a literal '.', or a 'any character'
> ?
> --
> --
Hello,
you should execute your select statement as an dynamic query, because plpgsql assumes
that there is valid / parseable query (and not a string containing a query) after the
"IN".
( the skeleton for iterating on the result of dynamic queries)
FOR record | row IN EXECUTE text_expression LOO
if (preg_match_all("|testing(.*?);blah|s", $str, $matches))
{
// do what you want with $matches: see in the manual!
var_dump($matches);
}
- Original Message -
From: "George E. Papadakis" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: 2001. május 20. 19:18
Subject: [PHP] R
see substr() in string functions (LXXIV)
- Original Message -
From: "Jason" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 21. 06:35
Subject: [PHP] Trimming 2 Characters from the end of a string?
> Hi,
>
>
> What would be the syntax to trim 2 characters off of a given s
select max(scorevalue) from score;
- Original Message -
From: "Jacky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 21. 22:38
Subject: [PHP] select the max value
Hi all
Is this the corerct way of selecting the max value in a table?
"select * from score where MAX(scoreva
that's great :)
From: "scott [gts]" <[EMAIL PROTECTED]>
> then people would think you're a perl programmer ;)
> >
> > In theory you could put all your code on one line.
> >
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
why don't you pass $x as an argument?
- Original Message -
From: "Johannes Schmiderer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 15. 23:41
Subject: [PHP] nested functions
> Is there no way to access the $x within the inner function:
>
> function outer()
> {
> $
nd it.
- Original Message -
From: "CC Zona" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 15. 22:19
Subject: Re: [PHP] still not friends with RegExps..
> In article <025c01c0dd7a$3b75d320$6a45c5d5@jaguar>,
> [EMAIL PROTECTED] ("Gyozo
CTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 15. 21:43
Subject: Re: [PHP] still not friends with RegExps..
> In article <00c301c0dd69$a64de040$6a45c5d5@jaguar>,
> [EMAIL PROTECTED] ("Gyozo Papp") wrote:
>
> > There is a function quotemeta
Hello,
while I was reading the post from 'elias', a fairly old question came in my mind which
I've not get any answer yet.
Maybe you can do it.
There is a function quotemeta() which escapes all special regexp character such as:
. \ + * ? [ ^ ] ( $ )
with a '\' except one the '|' pipe.
wha
As others metioned, you feel free to use Putty.
If it doesn't fit your needs, I 've a fairly old SSH extension to Teraterm Pro, i can
post it to you.
But it takes a little time to find it.
- Original Message -
From: "Dennis Gearon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001
Hi,
- Original Message -
From: "brent simpson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 13. 11:08
Subject: [PHP] passing variables without form submit
>
> I'm trying to write what I thought would be a pretty simple script
> action to pass a variable from a form e
Hello folks,
I've found some mail in the archive (php-install), but much fewer replies that helps
me.
I'd like to install my PHP 4.0.4pl1 with sablotron support on debian (frozen).
After ./configure --with-apxs --with-pgsql --with-sablot, I got the following error
(in debug.log)
/usr/bin/ld:
This is a very simple progress bar, you need to decorate it.
As you can see the step() function deals with the ellapsed time.
For more see your favourite javascript manual or
for example http://www.webreference.com/dhtml/
Feel free to use it:
#container {
WIDTH: 60px; POSITION: absolute;
Hello Chris,
to this seems to me an XML-stylish tag.
are you sure there is nothing else in the background?
- Original Message -
From: "Chris Anderson" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: 2001. május 6. 18:00
Subject: [PHP] Weirdest error I've ever had
> Alrig
There are some scripts in the postgres contrib directory which make such thing.
Some users are currently developping this scripts and put it in big one which do the
whole job.
check the postgres mailing lists and the archives.
- Original Message -
From: "Jason Beebe" <[EMAIL PROTECTED
PHP on PWS not working!
> >> 51589 by: Thomas Edison Jr.
> >> 51590 by: Thomas Edison Jr.
> >> 51600 by: Phil Driscoll
> >> 51640 by: Thomas Edison Jr.
> >> 51644 by: Phil Driscoll
> >>
> >> Re: Sorry, what is "PWS"
&g
put the array indices in single quote like :
echo "[a href=\"myscript.php?username={$userdata['username']}\"]Goto
MyScript.php[/a]";
- Original Message -
From: "Jason Stechschulte" <[EMAIL PROTECTED]>
To: "King, Justin" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]
hi,
note that this is also workin in PHP:
class A {
function aa(){}
function bb($x){}
}
class B extends A
{
function bb($x)
{
A::bb(); // inherited method called!!!
$this->aa();
}
}
Nice and perfect.
- Original Message -
From: "py" <[E
hi,
my tips for include remote PHP files.
first :
allow_url_fopen in php.ini,
at last:
note that neither include nor require for remote file does not work inder Windows.
best,
Papp Gyozo
- [EMAIL PROTECTED]
- Original Message -
From: "Robert Covell" <[EMAIL PROTECTED]>
To: "
Hello, girls and boys,
my question sounds a bit strange, but it 's very important for me to simplify my
database queries.
So, is there any known and implementable algorithm that simplifies an arbitrary
logical expression such as:
(either in PHP-style and in mathematical forms separated by comma
are you thinking of what this snippet does:
$menu = 'menu2';
$i = 2;
echo ${$menu}[$i];
- Original Message -
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: 2001. május 7. 22:16
Subject: [PHP] Variable Variable with array
> Hello,
>
> I am tr
Try this one :
$user_data['username'] = 'Alphonse';
$str = "my user name is {$user_data['username']}";
Papp Gyozo
- [EMAIL PROTECTED]
- Original Message -
From: "King, Justin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 7. 21:48
Subject: [PHP] Variable question
Ho
> Thanks for the additional code, now I see what you are after. Sorry, I don't
> know the answer, other than using curly braces will fix the problem for
> empty(). Also, a User Contributed Note at
> http://www.php.net/manual/en/functions.php#functions.user-defined has this
> to say:
>
>
> there
try,
$photos[] = $buffer; // without $i in brackets, this means append to the end of
the array
in the loop, maybe this helps.
- Original Message -
From: "tk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 7. 19:37
Subject: [PHP] help with fgets
> hi.
>
> i'm try
Well,
if you'd like to a little bit more sophisticated file reading,
just give a try to my class strStream, here is a lin to its short description
http://phpclasses.upperdesign.com/browse.html?file=784 (class reference)
http://phpclasses.upperdesign.com/packages/228 (the whole package)
Papp Gyo
and.
Papp Gyozo
- [EMAIL PROTECTED]
- Original Message -----
From: "Michael Roark" <[EMAIL PROTECTED]>
To: "Gyozo Papp" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: 2001. május 6. 22:53
Subject: Re: [PHP] quick
use fgets or fscanf (>= PHP 4.0.1)instead of fread.
Fgets(fp, length) ends reading when length - 1 bytes have been read, on a newline
(which is included in the return value),
or on EOF (whichever comes first).
- Original Message -
From: "Jan Grafström" <[EMAIL PROTECTED]>
To: <[EMAIL
Yeah,
VIM is cool, really, and is default part of most linux distributions.
- Original Message -
From: "Andrzej Swedrzynski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "John Vanderbeck" <[EMAIL PROTECTED]>
Sent: 2001. május 6. 18:20
Subject: RE: [PHP] best ide for windows
> On S
$pos = strpos($varone, 'is')
if ($pos === false) { /*not found */ }
- Original Message -
From: "Jamie Saunders" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 6. 16:58
Subject: [PHP] if string contains...
> Hi,
>
> I want to check whether a string contains a certain word
hello,
here is a list php editors:
http://www.itworks.demon.co.uk/phpeditors.htm
I 'm using Edit Plus 2 or PHPEd (depending on the weather :), by the way.
- Original Message -
From: "Alexander Bierbrauer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 6. 14:57
Subject:
hello,
maybe there is another solution that should be quicker, because it uses fewer DB query.
I don't have a clear view what you want from this query, so if you can give me a short
description about it
it would be appriciated. I think this one does the same job:
INSERT INTO galaxy
SELECT
Hello,
I don't know the way to declare static properties explicitly, maybe this is even not
supported yet.
But, ...
when I recently develop some classes in PHP I've found that static variables declared
inside methods behave like static properties in C++. This means you should write a
functio
Thank you very much for these links!
I'm to see all of them right now...
- Original Message -
From: "Philip Olson" <[EMAIL PROTECTED]>
To: "Gyozo Papp" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: 2001. május 5. 22:29
Subject: Re: [PHP]
Try to empty the web cahce of your browser.
And one more thing, in PHP there is a default time limit while a session is not killed.
[from the manual]
>> session.gc_maxlifetime specifies the number of seconds after which data will be
>seen as 'garbage' and cleaned up.
PHP sees your session a no
I might be wrong, but AFAIK session is connected to the client and the window or
application exactly.
This means that if you close the browser and
- Original Message -
From: "MySQL" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 5. 19:59
Subject: [PHP] Session problem
Hello,
after reading thorugh the short introduction about PEAR
I'd like to know that where I should start.
Can anyone give links to this PHP extension?
At this moment, http://pear.php.net is very "slim".
Thanks in advance
Papp Gyozo
- [EMAIL PROTECTED]
--
PHP General Mailing List (http:/
visit the page:
http://phpclasses.upperdesign.com/browse.html/package/13
and download it.
- Original Message -
From: "Matthew Luchak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 4. 22:11
Subject: [PHP] nslookup function ?
I'm working on a email address verification
"Mark Cain" <[EMAIL PROTECTED]> wrote in message
9cufuv$s20$[EMAIL PROTECTED]">news:9cufuv$s20$[EMAIL PROTECTED]...
>
> Two things:
> 1) Why does the code below produce this result?
> 2) How do I assign to an multidimensional array with dynamic keys?
>
> Here is the test code:
>
> $first = "E
"Mark Cain" <[EMAIL PROTECTED]> wrote in message
9cufuv$s20$[EMAIL PROTECTED]">news:9cufuv$s20$[EMAIL PROTECTED]...
>
> Two things:
> 1) Why does the code below produce this result?
> 2) How do I assign to an multidimensional array with dynamic keys?
>
> Here is the test code:
>
> $first = "E
Hello, Jennifer
are you still struggling with the trailing zeros?
Then try,
echo round($number, 2); // with ie.: $number = 123.45 and 123.00
As I know there is no particular float, but double type in PHP.
(double means "double precision number" -- ie.: 15 decimal places instead of 6 decima
Hi,
You are really messed up with this 'if' statement.
What you want is nicely described, so I won't repeat it, just make some correction...
function array2links($cat, $arr)
{
$i = 0;
$cat = rawurlencode($cat);
while ( list( $key, $val ) = each($arr))
{
$out .= "$val";
$pos = strpos($hostdomain, '.');
if ($pos === false) { /*no point found */}
else
$str = substr($hostdomain,0, $pos);
or much better:
$parts = explode('.', $hostdomain);
and you get all parts of $domain name.
from $hostdomain = "www.behsci.sote.hu"
$parts = array('www', 'behsci', 'sote', '
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 2. 21:34
Subject: [PHP] Strange behaviour of mktime() in objects
> Hi folks,
> I have to make several conversions from / to timestamp (seconds in the
> UNIX-Epoche)
> here you see two snippets of
what about function round() with precision argument ?
check it:
for ($i = 0; $i < 10; $i += 0.25) {
echo round($i,2). "";
}
- Original Message -
From: "Jennifer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 3. 08:53
Subject: [PHP] Working with numbers
> I have a s
another template engines:
http://phpclasses.upperdesign.com and browse for Templates!
or:
http://va.php.net/~andrei/tpl-engine.html
http://www.phpinsider.com/php/code/Smarty/ Smarty
- Original Message -
From: "Henrik Hansen" <[EMAIL PROTECTED]>
To: "Daniel Guerrier" <[EMAIL PROTECTE
what version of PHP are you running?
It works for me on PHP 4.0.4pl1. (CGI)
but, you may try:
$pattern = quotemeta("&"); // see quotemeta in the manual !
ereg_replace($pattern, "&", $url);
- Original Message -
From: "Jason Murray" <[EMAIL PROTECTED]>
To: "'Martin Bittner-Lamy'" <[EMAI
> I'm new at programing and not getting very far with this. I've looked
> at "array_revers" and "array_multisort" and can't get anything to work.
> What I have is a mysql table laid out like:
>
> item number | title | body text | subject heading
>
> What I want to do is pull the top 7 entries
From: "Jamie Saunders" <[EMAIL PROTECTED]>
Subject: [PHP] adding text to a variable name
> Is it possible to add text onto the end of a variable name?
> e.g. to add the word 'code' onto the variable $field so it would be $fieldcode
I think you want to do it in an automatic way for each variable
Hello PHP'ers
I am having a problem with string delimiters. For some reason no matter what I do I
can not get them to process correctly!!
For example,
";
?>
That outputs:
yes no
What am I doing wrong?! Is there something I need to set in the php.ini file? I would
like to be able to type \
> Hello,
> For instance today is 05-01-2001 I would like to
> determan the previous 7 days from that date. In VB
> Date - 7 = 04-24-2001 I would like this to work for
> any date using php.
> Here is what I have so far...
> $t = (date ("m-d-Y"));
> echo $t; // output 05-01-2001
> echo "";
> $r =
I can't quite get the logic to create my own associative arrays:
if:
$stuff[0]="165.33.114.63 anonymous Mozilla/4.0"
$stuff[1]="213.35.354.93 anonymous Mozilla/4.0"
how do I end up with:
$stuff[0][user]="165.33.114.63"
$stuff[0][browser]="Mozilla/4.0"
$stuff[1][user]="213.35.354.93"
$stuff[
68 matches
Mail list logo