php-general Digest 24 Feb 2009 19:02:37 - Issue 5977
Topics (messages 288726 through 288744):
Re: Why PHP won
288726 by: Michael A. Peters
288728 by: Per Jessen
288741 by: Michael A. Peters
288742 by: Per Jessen
288743 by: Michael A. Peters
Re:
Just tried serializing array of 256 booleans and printing the length, it
really shocked me: 2458. This project will be used by about 500 students, so
in the worst case (all students enroll all courses) it will eat 500 * 2458
(assuming one character eats one byte) = 1229000 Bytes ~= 1.2 MB. Not a
Clancy schreef:
I have been experimenting using four character alphanumeric keys on an array,
and when I
generated a random set of keys, and then used ksort to sort the array, I was
very
surprised to find that if the key contained any non-numeric character, or if
it started
with zero,
Stewart Duncan wrote:
Hi there,
I'm having some serious problems with the PHP Data Object functions.
I'm trying to loop through a sizeable result set (~60k rows, ~1gig)
using a buffered query to avoid fetching the whole set.
No matter what I do, the script just hangs on the PDO::query() -
From: Jim Lucas
I may be wrong, but I heard short tags were going the
way of the Dodo bird as of PHP6.
This is not surprising. With the advent of XHTML, the short tag option
collides with another valid tag, ?xml. So that option has to be
turned off as soon as you need any XML in your pages.
Reinhardt Christiansen wrote:
From: PJ af.gour...@videotron.ca
To: MySql my...@lists.mysql.com
Subject: how to deal with multiple authors for one book
Date: Mon, 16 Feb 2009 17:20:54 -0500
In my db there are a number of books with several authors; so, I am
wondering how to set up a table
---
Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get
a Free CD of Ubuntu mailed to your door without any cost. Visit :
www.ubuntu.com
--
On Tue, Feb 24, 2009 at 3:24 AM, leledumbo leledumbo_c...@yahoo.co.id wrote:
Just tried serializing array of 256 booleans and printing the length, it
really shocked me: 2458. This project will be used by about 500 students, so
in the worst case (all students enroll all courses) it will eat 500
Hi there,
I am trying to pars an XML file with php. This works if the xml tag
looks like this: anbieternr88/anbieternr
In that case I retrieve the info: $xml-anbieternr
But now the tag looks different like this:
imo:anbieternr88/imo:anbieternr
The command $xml-imo:anbieternr does not work
Bob McConnell wrote:
From: PJ
Here's my test page and, so far, nothing works...
Please expound on nothing works What do you see in the browser?
What do you see in the server logs?
It's not in the browser that I look, rather in the db: nothing is
INSERTed. I have confirmed
On Tue, Feb 24, 2009 at 9:51 AM, Merlin Morgenstern
merli...@fastmail.fm wrote:
Hi there,
I am trying to pars an XML file with php. This works if the xml tag looks
like this: anbieternr88/anbieternr
In that case I retrieve the info: $xml-anbieternr
But now the tag looks different like this:
Ryan Panning wrote:
I have discovered that when I foreach over a RecursiveDirectoryIterator
(see example below) the $item actually turns into a SplFileInfo object.
I would expect it to be a RecursiveDirectoryIterator. How do I do a
hasChildren() on SplFileInfo?
seems like expected
I read that you already got your script performance up,
but I'd still like to suggest that you shouldn't be reading in
a complete 18Mb file (especially given that you don't know
in advance whether some day(s) this size might be much larger).
instead you should be opening a handle to the file and
Per Jessen wrote:
Michael A. Peters wrote:
[anip]
and you can use DOMDocument to completely
construct the page before sending it to the browser - allowing you to
translate xhtml to html for browsers that don't properly support
xhtml+xml.
I suspect you meant translate xml to html? I publish
Michael A. Peters wrote:
Per Jessen wrote:
Michael A. Peters wrote:
[anip]
and you can use DOMDocument to completely
construct the page before sending it to the browser - allowing you
to translate xhtml to html for browsers that don't properly support
xhtml+xml.
I suspect you meant
Per Jessen wrote:
I don't use any of them, but I thought even IE6 was able to deal with
xml.
What happens is IE6 (and I believe IE7) asks the user what application
they want to open the file with if it receives an xml+xhtml header.
IE does parse xhtml but only if sent with an incorrect
Hi,
I am trying to write a PHP interface to ISBNdb.com. When I make a certain
request, the following is returned
ISBNdb server_time=2009-02-24T18:57:31Z
BookList total_results=1 page_size=10 page_number=1
shown_results=1
BookData book_id=language_proof_and_logic isbn=157586374X
Jochem Maas wrote:
I read that you already got your script performance up,
but I'd still like to suggest that you shouldn't be reading in
a complete 18Mb file (especially given that you don't know
in advance whether some day(s) this size might be much larger).
instead you should be opening
On Tue, Feb 24, 2009 at 6:51 AM, Merlin Morgenstern
merli...@fastmail.fm wrote:
The command $xml-imo:anbieternr does not work in that case.
Has somebody an idea how to adress this?
you could cheat and string replace the node prefix in the document
imo: to imo_ and then you can use simplexml.
Ok guys, I'm going blind indeed, this is a simple tiny query that goes to a
form and I get the error : Error, insert query failed
ever since I added the fields StartDate and EndDate and advertiser what
is going on
here is the php
?php
$ebits = ini_get('error_reporting');
On Tue, 2009-02-24 at 08:51 -0500, Bob McConnell wrote:
From: Jim Lucas
I may be wrong, but I heard short tags were going the
way of the Dodo bird as of PHP6.
This is not surprising. With the advent of XHTML, the short tag option
collides with another valid tag, ?xml. So that option
On Tue, Feb 24, 2009 at 14:55, Terion Miller webdev.ter...@gmail.com wrote:
And yes yes I know escape my strings ...I'll go back and do that when the
stupid insert is actually working...
I'd suggest that it's probably the reason your insert isn't
working. Add your
On Tue, Feb 24, 2009 at 8:59 AM, PJ af.gour...@videotron.ca wrote:
Reinhardt Christiansen wrote:
From: PJ af.gour...@videotron.ca
To: MySql my...@lists.mysql.com
Subject: how to deal with multiple authors for one book
Date: Mon, 16 Feb 2009 17:20:54 -0500
In my db there are a
Forgot to click reply all! Sorry.
-- Forwarded message --
From: Lewis Wright lewiswri...@gmail.com
Date: 2009/2/24
Subject: Re: [PHP] help installing phpDocumentor
To: a...@ashleysheridan.co.uk
Turn on notices and maybe even strict messages (in your development
environment), and
On Tue, 2009-02-24 at 20:18 +, Lewis Wright wrote:
Forgot to click reply all! Sorry.
-- Forwarded message --
From: Lewis Wright lewiswri...@gmail.com
Date: 2009/2/24
Subject: Re: [PHP] help installing phpDocumentor
To: a...@ashleysheridan.co.uk
Turn on notices and
I'm sorry, Gmail makes me do it!
2009/2/24 Ashley Sheridan a...@ashleysheridan.co.uk:
On Tue, 2009-02-24 at 20:18 +, Lewis Wright wrote:
Forgot to click reply all! Sorry.
-- Forwarded message --
From: Lewis Wright lewiswri...@gmail.com
Date: 2009/2/24
Subject: Re: [PHP]
Well I was going blind ready for a good laugh
it was that the form was posting to the original page not the test page I
was working with...um..DOH!!
all things working now :)
Thanks
Terion
Happy Freecycling
Free the List !!
www.freecycle.org
Over Moderation of Freecycle List Prevents Post
From: Lewis Wright
Turn on notices and maybe even strict messages (in your development
environment), and PHP should warn you of any deprecated code.
Easier said than done. I don't have an IDE available. I have tried the
Komodo editor and am now playing with Eclipse/PDT, but neither of those
2009/2/24 Bob McConnell r...@cbord.com:
From: Lewis Wright
Turn on notices and maybe even strict messages (in your development
environment), and PHP should warn you of any deprecated code.
Easier said than done. I don't have an IDE available. I have tried the
Komodo editor and am now
On Tue, 2009-02-24 at 20:55 +, Lewis Wright wrote:
2009/2/24 Bob McConnell r...@cbord.com:
From: Lewis Wright
Turn on notices and maybe even strict messages (in your development
environment), and PHP should warn you of any deprecated code.
Easier said than done. I don't have an
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
the lay language is WHERE stamp is within
On Tue, 2009-02-24 at 15:15 -0600, Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no clue
Terion Miller wrote:
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
Try
$query .= WHERE stamp SUBDATE(NOW(), INTERVAL -7 DAY);
instead.
Marc
--
http://bithub.net/
Synchronize and share your files over the web for free
My Twitter feed
Marc Steinert wrote:
Terion Miller wrote:
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
Try
$query .= WHERE stamp SUBDATE(NOW(), INTERVAL -7 DAY);
instead.
Marc
Damn, hit the send-button too fast. Replace -7 with 7. Sry for spamming the
list.
--
Thodoris wrote:
Stewart Duncan wrote:
Hi there,
I'm having some serious problems with the PHP Data Object functions.
I'm trying to loop through a sizeable result set (~60k rows, ~1gig)
using a buffered query to avoid fetching the whole set.
No matter what I do, the script just hangs on
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
the lay language is
Has nothing at all to do with php.
http://dev.mysql.com/doc/refman/5.0/en/datetime.html
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
Yeah guess I posted to the wrong list should of been on the php-db list
maybe
but thanks for the suggestions
Marc I'll be trying yours
Chris napsal(a):
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records
if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no clue here on this
the lay
Nobody has asked to confirm, but what format is `stamp`?
Unix Timestamp, MySQL Timestamp, MySQL Date stamp???
--
Jim Lucas
Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.
Twelfth Night, Act II, Scene V
by William Shakespeare
Martin Zvarík wrote:
Chris napsal(a):
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records
if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp NOW()-7 ; I have no
Micah Gersten napsal(a):
Martin Zvarík wrote:
Chris napsal(a):
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records
if the
timestamp on the record is in the past 7 days from NOW()
$query
Micah Gersten wrote:
Martin Zvarík wrote:
Chris napsal(a):
Terion Miller wrote:
Need syntax help when it comes to using a timestamp.
What I'm trying to say in my query WHERE clause is to select records
if the
timestamp on the record is in the past 7 days from NOW()
$query .= WHERE stamp
I have been pondering whether it would be feasible to work with a 100,000 entry
index
file, and had put yesterday aside to do some timing tests. I first generated
some sample
index files of various lengths. Each entry consisted of a single line with the
form
ASDF;rhubarb, rhubarb,
where
Micah Gersten wrote:
$query .= WHERE stamp .(time()-7*3600*24);
Using something like that is disastrous for DST and Leap Seconds...
That's why you use UTC for servers and translate to local time when you
need to display it.
Not sure that solves the leap second issue, but it
On Tue, 24 Feb 2009 10:25:25 +0100, joc...@iamjochem.com (Jochem Maas) wrote:
Clancy schreef:
I have been experimenting using four character alphanumeric keys on an
array, and when I
generated a random set of keys, and then used ksort to sort the array, I was
very
surprised to find that if
Generally relationships like the one you describe are stored in three
separate and related tables: Students, Courses, and Enrollment. The
latter is a n:m association between the first two. The advantage this
approach has with regard to storage is that it is a sparse matrix.
I've done that
Terion Miller wrote:
Nobody has asked to confirm, but what format is `stamp`?
Unix Timestamp, MySQL Timestamp, MySQL Date stamp???
--
Jim Lucas
Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.
Twelfth Night, Act II, Scene V
by
Jim Lucas wrote:
Terion Miller wrote:
Nobody has asked to confirm, but what format is `stamp`?
Unix Timestamp, MySQL Timestamp, MySQL Date stamp???
--
Jim Lucas
Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.
Twelfth Night, Act II,
On Wed, Feb 25, 2009 at 12:12 AM, leledumbo leledumbo_c...@yahoo.co.id wrote:
Generally relationships like the one you describe are stored in three
separate and related tables: Students, Courses, and Enrollment. The
latter is a n:m association between the first two. The advantage this
Good points, I'll try it.
Without testing it (it's late here), your binstr() function doesn't
accept parameters, so it would always return the same result each time
it's called, regardless of what you pass into it.
In case you want to check it tomorrow or later:
private function binstr() {
leledumbo wrote:
Good points, I'll try it.
Without testing it (it's late here), your binstr() function doesn't
accept parameters, so it would always return the same result each time
it's called, regardless of what you pass into it.
In case you want to check it tomorrow or later:
private
Merlin Morgenstern wrote:
Hi there,
I am trying to pars an XML file with php. This works if the xml tag
looks like this: anbieternr88/anbieternr
In that case I retrieve the info: $xml-anbieternr
But now the tag looks different like this:
imo:anbieternr88/imo:anbieternr
The command
53 matches
Mail list logo