Just pass the current position from one page to the next and use a
LIMIT start,num clause.
-Rasmus
On Wed, 2 Oct 2002, Francisco Vaucher wrote:
Hi people,
i've been searching for a while in google and vivisimo for docs that treats
paging techniques for php and mysql. And so far i seek
Your code makes no sense and the error message is telling you exactly what
you did wrong. opendir() returns a directory handle to be passed to
readdir(). Calling chdir() on a directory handle makes no sense. You
want to chdir to the same string that you passed to opendir()
-Rasmus
On Wed, 2
Thank you very much, I did not know sort would work this way. Makes complete
sense now though. Thansk again I will give it a shot.
Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Sort the arrays and pick off the first and last elements.
On Wed, 2
Hi,
Is it so that in php 4.2.3 we have to do both...addslashes and
removeslashes ?? coz in one of the older versions the things are goin fine
without using removeslashes but it doesnet seem to be the case in
php4.2.2.
thanx and regards
anil
--
PHP General Mailing List (http://www.php.net/)
No, nothing has changed in recent memory with respect to this.
On Wed, 2 Oct 2002, Anil Garg wrote:
Hi,
Is it so that in php 4.2.3 we have to do both...addslashes and
removeslashes ?? coz in one of the older versions the things are goin fine
without using removeslashes but it doesnet seem
Hello,
how can I use global variables in my web portal? I have read the php
documentation, but it works only in the same file.
I want use more global variable on many php site.
For example:
In login.php I use the code
$first=mysql_result($result,0,FIRST_NAME);
and I want to print
I was able to work around this solution by using it on a different
server with a different version of PHP.
I decided to do this after reviewing the search results at Google.com
This is a known bug that the PHP development team has chosen to ignore,
as this article clearly outlines:
Hi,
it's a great tip to install PhpMyAdmin - or phpPgAdmin for PostgresSQL -
this will only take you at most half an hour even for a newcomer.
You can then easily test queries, see any error messages and see what
result they have on tables.
In this case I'd echo out the query
echo $query =
Hi,
I need to do either an insert or update into a MySQL table. Insert if there
are 0 records or update if one record exist:
This is my code snippet:
if (mysql_query(SELECT COUNT(*) FROM AuthNum) == 0) {
mysql_query(INSERT into AuthNum (FirstNum, LastNum, NextNum) VALUES
(1,2,3),$dblink);
$result = mysql_query();
if (mysql_num_rows($result) $x)
-Kevin
- Original Message -
From: DonPro [EMAIL PROTECTED]
To: php list [EMAIL PROTECTED]
Sent: Wednesday, October 02, 2002 2:35 PM
Subject: [PHP] counting number of records in a MySQL table; how do I get the
result?
Hi,
I
$ret = mysql_query(SELECT count(*) as foo FROM AuthNum);
$result = mysql_fetch_array($ret);
echo $result['foo'];
One of many ways...
-Rasmus
On Wed, 2 Oct 2002, DonPro wrote:
Hi,
I need to do either an insert or update into a MySQL table. Insert if there
are 0 records or update if one
Here is the URL to a project that is far as I am concerned was finished.
http://www.overbrookfarm.myiglou.com
It is a Flash site that uses PHP for dynamically updating text in some text fields.
If I can direct you to the Stallions menu---pick a horse.
A page should load that has a picture of
As far as I know there is no way to set a site-wide global from within a
script. Use PHP Sessions or set a Cookie and then print the variable in any
script you want by calling $_SESSION['first'] or $COOKIES['first'];. But
you'll need a starting point for your visitors in order for this to work.
Extraordinarily helpful; thank you very much! Thanks to both Mike and Kevin
on this.
Jen
Why does this work:
$contents =
eregi_replace((\)(.(/))*[A-Z0-9_/-]+(.gif|.jpg),
\blah.gif, $contents);
But this does not:
preg_match_all((\)(.(/))*[A-Z0-9_/-]+(.gif|.jpg),
hi,
i'm running PHP 4.0.6 with apache on RedHat 7.2 , error_reporing is set to
default(2039) in the php.ini file :
my script is as follows :
?
qwe;
dsf
?
But i dont get even a parse error or anything
Any clues to what is going wrong ?
thx
gamin.
--
PHP General Mailing List
Hi!
I had PHP compiled with the --with-mcrypt option. So, when I use this
script, PHP spit out the error Warning: could not open encryption module
but it work fine if I use other script like $SSL_CIPHER_USEKEYSIZE.
--clip--
mcrypt_module_open(MCRYPT_TripleDES, , MCRYPT_MODE_ECB, );
I probably should've used the term static from the beginning. - maybe
The mistake is mine not yours. I know about the :: operator I use it all the
time (but within classes parent::function() etc) - but I never realised
until now that PHP will let you use any class before instantiation (and
Check ur php.ini, there are settings to display showing absolutly any error,
warning, and message. they are probaly set to not show them.
error_reporting = E_ALL ~E_NOTICE
thats what i use, only displays what i need
Jason Reid
[EMAIL PROTECTED]
--
AC Host Canada
www.achost.ca
- Original
Shot in the dark that may or may not help... Look into display_errors
and log_errors. I think those are the names. They control where error
output goes.
Cheers,
Rob.
gamin wrote:
hi,
i'm running PHP 4.0.6 with apache on RedHat 7.2 , error_reporing is set to
default(2039) in the php.ini
The mistake is mine not yours. I know about the :: operator I use it all the
time (but within classes parent::function() etc) - but I never realised
until now that PHP will let you use any class before instantiation (and
nearly all my PHP work uses classes). I have never even attempted to try
Hi,
My hosting provider still using CGI as Server API. I think this is way too
much dropped behind. On my own development server I use Apache as
Server API. However, maybe this could be a kind of consideration for
the situation that multi-sites hosted on one server? I am thinking I'd
better
PHP allows static method calls... But back to my original question...
inside a method that has been called statically, can I determine for what
class the method was called? Again, obviously the question is only
applicable if there is some inheritance involved, and the child class does
not
I'm getting much closer to achieving my goal here. Now, I'm missing yet one more
element. Here is my code:
--
$filename = newexample.html;
$fd = fopen ($filename, r);
$contents = fread ($fd, filesize ($filename));
preg_match_all('{\/*[A-z0-9_/-]+(.gif|.jpg)}', $contents, $matches);
Since static method calls are completely disconnected from any class
instance asking which class the method call is from is rather meaningless,
and no, I don't think there is any way to get that.
-Rasmus
On Wed, 2 Oct 2002, Nick Eby wrote:
PHP allows static method calls... But back to my
I am the webmaster of the site, i pay for the server space,
is that what you mean?
First up Simon, I deleted over a hundred lines of no longer relevant
content from your message including things like signatures. You should
probably trim messages down when you reply to them...
Next up,
Without them being defined in some special way?
I am very surprised that after 7 years of OOP I dont know that but I will
check it out tomorrow.
Debbie
- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Nick Eby [EMAIL PROTECTED]
Cc: Debbie Dyer [EMAIL PROTECTED];
[EMAIL
which is what I suspected... thanks for confirming. and yes, the call is
disconnected from any class _instance_, but not from any class. as you said
before, PHP has some OO differences from java, etc, and this is one of
them... if you had static members, then methods called statically would
$result = mysql_query();
if (mysql_num_rows($result) $x)
-Kevin
This won't work because a SELECT COUNT(*) query always returns a row,
even if it returns zero as the value.
$result = mysql_query(SELECT COUNT(*) FROM ... );
$count = mysql_result($result,0);
---John Holmes...
- Original
how can I use global variables in my web portal? I have read the php
documentation, but it works only in the same file.
I want use more global variable on many php site.
For example:
In login.php I use the code
$first=mysql_result($result,0,FIRST_NAME);
and I want to print
If you are using IIS, then PHP runs as the IIS user,
IUSR_computer_name. If your computer name is Mango, then it'd be
IUSR_MANGO.
---John Holmes...
-Original Message-
From: Ionut Ciocirlan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 02, 2002 2:54 PM
To: PHP List
Subject:
On 2 Oct 2002 at 22:06, Anna Gyor wrote:
how can I use global variables in my web portal? I have read the php
documentation, but it works only in the same file. I want use more
global variable on many php site.
For example:
In login.php I use the code
I noticed that by default, my display_errors was actually OFF, and the
only way to see my errors was through Apache's error.log file
I don't know if that's already been checked, but... figured I'd try to help.
-Jason
Gamin wrote:
Yes,
On both my development machine and implmetation
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hey,
Is short_tags on?
~Pauly
On Wednesday 02 October 2002 05:51 pm, gamin wrote:
hi,
i'm running PHP 4.0.6 with apache on RedHat 7.2 , error_reporing is set
to default(2039) in the php.ini file :
my script is as follows :
?
qwe;
dsf
?
I took a course on PHP for Flash and the entire class ran into this problem.
There was a problem with the Flash plug-in awhile back that was causing
problems with dynamic text being loaded. Have your client download and
install the most recent plug-in and that should fix the problem.
-
check the permissions on the directory the image is in as well
On Wed, 2002-10-02 at 12:51, Dan McCullough wrote:
anyone know what migth cause this error. I changed the mode to 777, made sure that
is was the
correct owner.group.
getimagesize: Unable to open
I am having problems with arrays. I guess I just don't understand them all
that well.
I have an simple array of stock tickers. Then for each ticker I go to Yahoo
to get their current price and try to push the Name of the ticker and it's
value into an associative array(I think). Then I want to
I still haven't figured this out.
URL problems? No. The first time I tried it I copied the URL directly out of
my IE address bar to just check the file in Netscape quick to see how it
looked.
You are not authorized to view this page
HTTP 401.3 - Access denied by ACL on resource
Internet
Forgot to mention that I have no proxy settings set for either IE or
Netscape.
Chris Nielsen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I still haven't figured this out.
URL problems? No. The first time I tried it I copied the URL directly out
of
my IE
so why not take that resulting row, and then do an if on it to see if the
value is a zero? an extra step, but it would work
John W. Holmes [EMAIL PROTECTED] wrote in message
002c01c26a66$61f0e1a0$7c02a8c0@coconut">news:002c01c26a66$61f0e1a0$7c02a8c0@coconut...
$result = mysql_query();
if
Or another way if you don't want a result when it's zero.
$rslt = mysql_query(SELECT count(*) as cnt FROM tbl having cnt 0);
HTH..
Have a great day..
Dan
Rasmus Lerdorf wrote:
$ret = mysql_query(SELECT count(*) as foo FROM AuthNum);
$result = mysql_fetch_array($ret);
echo $result['foo'];
Hi,
1. you might start by removing things which are common problems... make
everything lowercase, uppercase, uppercasewords, etc etc (if not permanent,
just for comparison). You may also strip out leading and trailing
whitespace, multiple spaces, etc etc. You may choose to remove LTD, PTY,
I think parseurl() does what you want... it's in the manual (surprise
surprise!!)
http://php.net/parseurl
Justin
on 03/10/02 5:18 AM, Joseph Szobody ([EMAIL PROTECTED]) wrote:
Folks,
I want to keep track of referers to my site. I want to store the domain name
of the referer in a db
Hi,
Thursday, October 3, 2002, 6:06:52 AM, you wrote:
AG Hello,
AG how can I use global variables in my web portal? I have read the php
AG documentation, but it works only in the same file.
AG I want use more global variable on many php site.
AG For example:
AG In login.php I use the code
AG
Hello ,
a href=Delay.php?hid=?php echo $hid+1; ?img src=Gif/nextque.gif
border=0/a
While clicking this link the $hid value get incremented and fetch the value
from the database according to that..the same thing is working in linux
platform and it is not working for the windows
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hey,
I've helped you as far as I can without actually seeing the rest of the
script to check if that value gets overridden somewhere else.
- From the sample you are giving us everything looks ok *if* register_globals
is on(and you say that it is).
If you go to http://valsignalandet.com/feedback.php you can get a clearer indication
of what I am trying to get rid of. Following is my function using to produce the
stuff up there, which I don't want, instead, I either want cookie-driven information
or nothing (if no cookie is set):
I have written a script in which the main purpose is to download html pages
from multiple web servers. I'm using the fopen() function to download these
pages. I would like to be able to download only the source (text) and no
binary data as this would greatly improve the speed of my script.
It looks like your problem is simply in the debug line, where you echo
print_r(array_values($TickersCurrent));
You shouldn't call array_values() before print_r(), since array_values
generates an indexed array of only the values (quotes), not the keys
(tickers), of the supplied array, essentially
I am hoping someone can please help me. I belong to a large online game,
which hosts several sub games. Each sub games has been assigned a certain
amount of space with which to put up a website. The site itself is running
with php enabled but mysql is limited for security reasons. So I have
Hello List for the first time,
I am very new to php but impressed from what i've seen so far. I managed to
configure php w/ mysql and db2 do some selects, inserts ...
What I am inerested in is what are all those mod_php* and php_* on the
distribution's CDs e.g. if they are installed how do i
Well, I'm not the best qualified to answer this question but here goes my
best shot (Guru's watch me here make sure I don't screw this up).
Starting with Apache. Apache does not actually process your *.php files.
There is another engine that takes care of that called Zend. There are a
couple
101 - 151 of 151 matches
Mail list logo