#x27; => 'peach');
Then, out of all the POST members returned, I can pick out the ones
pertaining to fruit by simply looking for ones which have the 'fruit_'
prefix as their index. It tends to be clunky, but it's the only way I've
found to make it work:
$fruits = get_fruits_from_table();
foreach ($fruits as $key => $value) {
$index = 'fruit_' . $key;
if (isset($_POST[$index])) {
echo "The user wants fruit #$key, $value.";
}
}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
virtues?
Of course not. He actually meant PostgreSQL, which *does* have virtues.
(No flames. I'm teasing.)
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t; broadcast email script and willing to help me?
>
Use PHPList. It's free.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ughts on the script and its effectivness?
>
> $deny = array("111.111.111", "222.222.222", "333.333.333");
> if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) {
>header("location: http://www.google.com/";);
>exit();
> } ?
erver
over there will trust. The "bounce" message you got indicates that
relaying from you is forbidden at the destination mail server.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
27;t know the mechanism by which they determine
what is and isn't a dynamic IP.)
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Oct 23, 2009 at 01:54:40PM -0400, Brad Fuller wrote:
> Thanks Ash you are awesome!
Brad, you're violating list rules. We never say that kind of thing to
Ash *where he can hear it*. Only behind his back. ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.
ISP would
accept it. It's just the From:. Again, I could be wrong.
5. This would be a lot simpler if you just call Shaw and ask them for
the name of the mailserver, and ask them if it's a problem for you to
post mail from your internal webserver to their mailserver. Then ask
them why such posts might bounce with a 5XX error.
Paul
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
y component which deals with the database class. The model serves up
whatever data the controller needs to feed to the view.
All are welcome to disagree.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, Oct 27, 2009 at 04:11:32PM +, David Otton wrote:
> 2009/10/27 Paul M Foster :
>
> > On Tue, Oct 27, 2009 at 05:27:07PM +1100, Eric Bauman wrote:
>
> >> I'm in the process of implementing an ultra-light MVC framework in PHP.
> >> It seems to b
end of things to take care of, quite outside of
redisigning phpclasses.net. I'd suggest you scrap the contest and go
find a good free CSS template. But that's just me.
And just for the record, I'm really not ragging on you. PHPClasses.net
is the only site of its kind I know of. Th
nd define
> it as a constant. It can be as simple or as complex as you need.
>
> Something
>
> -- or --
>
> echo 'Something';
+1
I initialize a "links" class from the config, and then use it to serve
up link text and URLs depending on the parameters
On Sun, Nov 08, 2009 at 06:30:37PM -0500, Robert Cummings wrote:
> Also, why support
> two libraries for which one is obviously inferior in speed and
> functionality?
>
Because Tony's Radicore framework has a bunch of ereg* calls in it. ;-}
Paul
--
Paul M. Foster
--
PHP Gen
rned
on. However, Java is another story. You may find that many more have it
turned off.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
itle]";
Then ensure that video_display.php is set up to fetch the video whose ID
is passed to it via the GET parameter.
All this assumes I understood what you're getting at. Which is
questionable. ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Thu, Nov 19, 2009 at 03:53:55PM +0100, Nisse Engström wrote:
> On Wed, 18 Nov 2009 10:31:59 -0500, Paul M Foster wrote:
>
> > Replace your query with:
> >
> > "SELECT title, id FROM videos WHERE topid1 = '$topic'"
> >
> > or whatever ind
On Thu, Nov 19, 2009 at 03:07:42PM +, Ashley Sheridan wrote:
> On Thu, 2009-11-19 at 10:09 -0500, Paul M Foster wrote:
>
>
> Ahem. You are correct. I should have escaped the double quotes. I've
> *never* made this kind of mistake before. ;-}
>
> Pau
ame is tedd and not todd. :-)
I think the real question is what did you do with todd? Are those his
feet sticking out from behind that cabinet over there?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
exes. Moreover,
without selecting the specific index tag, your search won't go any
faster as a result of the index.
I suspect the bottleneck is in the way the drivers access the file.
xBase is a fixed length record format with a variable length header, so
it's pretty simple and fast to pu
se {
show_the_file_for_the_first_time();
}
In the do_validation() step, you validate the form. If there is a
problem and you want to re-show the form, you would typically do this
for each field:
In other words, you store the form values in the $_SESSION array.
Paul
--
Paul M. Foster
hat's part of what I use it for.
(No, I don't make any money off the program. I wrote it for my own use
and put it up on sourceforge years ago in case someone could use it.)
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
? Intead of
> $_COOKIE['item_number'] have $_COOKIE['cart']['item_number'] like I have the
> SESSION?
First, don't use multiple cookies; already covered elsewhere. Second,
you can serialize/unserialize array data and store it compactly in a
cookie. See
$stmt = NULL; /* release the connection */
>
> /*if not done with stack, redirect to self to get next*/
>if (!empty($_SESSION['DOCIDs']) and
>$_SESSION['numberCand'] < count($_SESSION['DOCIDs']))
>{
>exit;
>
>}
>}
> }
>
> /* once done, go back to display search page after clearing stack
> if(isset($_SESSION['DOCIDs']))
>unset($_SESSION['DOCIDs'] );*/
>
> $res = null;
> $dbh1 = null;
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> no, your confused with that other list php-psychics. :-) (STA)
I thought that list was swallowed by a .Net black hole? ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nst
> mishaps and MySQL is known more for performance.
PostgreSQL generally matches MySQL in performance, and maintains
referential integrity (foreign keys and such) without the need for
multiple backend storage engines.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.
df->MultiCell() to accomplish this,
rather simply $pdf->Write() (it's kinda like a textarea in HTML).
There's probably something comparable in TCPDF.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
such a way that there's just no way to
adapt it to different circumstances.
But for the most part, it's like any other code you expect to reuse,
whether it's just a function, a plain class or whatever. If you
implement it properly, it will be reusable elsewhere.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Sun, Jan 10, 2010 at 06:41:19AM -0800, Michael A. Peters wrote:
> Daevid Vincent wrote:
>
>>
>> What do you guys all do?
>
I leave it off. I don't want to have to worry about which editor I'm
using or whether I accidentally left some whitespace where it shouldn&
time through, the
value attribute will yield nothing.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ns, at:
http://us2.php.net/manual/en/book.bc.php
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nt and can only be seen after tens
> of thousands iterations. PHP's rounding function is quite sufficient.
This is called (among other things) "banker's rounding". But PHP's
round() function won't do banker's rounding, as far as I know.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Am I right or it really doesn't matter "who" sent the email?
Since the mail() function doesn't have a parameter for the "From:", how
do you force it to be a certain thing in the first place?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
many spins
> > occur over the throw distance.
> >
> > Cheers,
> > Rob.
> > --
> > http://www.interjinn.com
> > Application and Templating Framework for PHP
> >
>
>
> There's always a chance that if thrown, the egg won't contact end-on.
> Has anyone thought to factor this in?
Is that an African or European egg?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, Jan 12, 2010 at 06:08:59PM +, Ashley Sheridan wrote:
> On Tue, 2010-01-12 at 13:10 -0500, Paul M Foster wrote:
>
> On Tue, Jan 12, 2010 at 05:24:06PM +, Ashley Sheridan wrote:
>
> >
> >
> > There's always a chance that if t
o do so.)
>
> Obviously, I'm missing something incredibly basic. Can anyone help me figure
> this out?
For one thing, I'd put a space after "Location:" in the header() call.
But I've found that this call will sometimes fail (or *look* like it
fails) unless yo
o from that to "real" bibTex, which I
> may need to do at some point.
>
> What I'm hoping is that already exists some php classes / functions for
> dealing with the XML bibTeX but I haven't found them. Anyone know of any?
I don't know, but the first place I look
ms kind of silly when you could just as
easily write external functions which perform similar functions.
Bottom line is, study OOP (look it up in wikipedia.org), and if you
think its advantages are worth your effort to learn the new paradigm, go
with it. But ignore the hype (and there's a lot of it
es
> this place any limitations on using both sessions and cookies in the
> same program?
I don't believe so. If I'm not mistaken, session values are stored on the
server, not on the client. What's stored on the client is the session
ID.
Please bear in mind my understanding
On Tue, Jan 19, 2010 at 05:44:56PM +, Ashley Sheridan wrote:
>
> Oh, and your flame suit failed because you forgot the quotation marks around
> the attribute values, and you didn't close the tag :p
Dang! I *thought* it felt awfully warm in here.
Paul
--
Paul M. Foster
-
ndency injection transparently.
Again, a complex proposition.
> Another advantage of OOP that is difficult to
> provide via the procedural paradigm is polymorphism.
Agreed. Though the advantages of polymorphism are questionable,
depending on your viewpoint.
Paul
--
Paul M. Foster
a little crippled by comparison.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e to build OO
components which were usable in this context, I'd be happy to use them.
OTOH, MVC (OOP on steroids) is just beyond reasonable in most cases for
client sites.
I will also echo that it takes a lot of time/work to correctly build OO
components, compared to straight functions or fu
, some from the
> lists:
> - Drupal
> - Tomato CMS
> - modx
> - xoops
> - Symphony
Add CodeIgniter to your list. Relatively easy to understand and extend.
Though I'm not sure I'd classify it as a "content management system".
(Same for Symfony.)
Paul
"designers" who don't know HTML but do the work of designing pages.
This is just simple advice based on my experience. Feel free to ignore
it completely if you work better a different way.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>
> What I am looking for is in strpos(), no?
>
> if ()
> {
> }
>From what I understand, strpos() faster than a lot of other similar
string functions and much faster than regexps. You could do:
if (strpos($mydata->restored, '') === 0) {
do_
item that corresponds to the location where print_debug()
> was called.
+1
Or you can use debug_print_backtrace(), which directly outputs the
backtrace. I do this when my error handler encounters E_USER_ERROR and
the like.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the local
mailserver deal with transferring mails in its own sweet time. I don't
know if there's a mailserver included in XAMPP installations, but if so,
I'd do that. In fact, if you're just sending simple emails, you could
use PHP's built-in mail() function, which wil
g one yourself, save yourself some time and
convert all dates to Julian day numbers internally. This saves massive
amounts of computation in determining intervals and durations.
Typically, coders try to store dates in unix timestamps internally, and
then add 86400 seconds for every day to calculate int
On Mon, Jan 25, 2010 at 08:12:43PM -0800, Daevid Vincent wrote:
> > -Original Message-
> > From: Paul M Foster [mailto:pa...@quillandmouse.com]
> > Sent: Monday, January 25, 2010 8:05 PM
> > To: php-general@lists.php.net
> > Subject: Re: [PHP] If the first fo
nd is available on the host system. Check
first to make sure.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
eover, most (all?) Linux MTAs on boxes like this don't block
while they make connections. From the OP's description, it sounded like
his phpmailer() process was blocking while it made foreign connections.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
;m in the majority (almost 2:1) who close their
> opening PHP tags. :)
Gosh, I can't believe so many people could be so *wrong*. ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
For example, I won't use screwdrivers whose handles aren't covered with
rubber over the plastic of the handles (Stanley and Klein brands).
What I like about programming is that you get to build your own tools,
just the way you like them. ;-}
Paul
--
Paul M. Foster
--
PHP General Mai
end of the
routine. That statement doesn't fire with the above code.
The docs on magic methods are pretty slim, so I'm not sure what it is
I'm missing. Can someone enlighten me?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, Jan 27, 2010 at 11:19:34AM +0800, Eric Lee wrote:
>
>
> On Wed, Jan 27, 2010 at 11:04 AM, Paul M Foster
> wrote:
>
> I have a class which instantiates other classes, and has a magic method
> like this:
>
> function _get($classname)
>
the data from
/usr/share/file/magic, which has a more thoroughgoing understanding of
ogg files. Unless someone's built a class which does this for you.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, Jan 26, 2010 at 07:21:34PM -0800, Daevid Vincent wrote:
> > -Original Message-
> > From: Paul M Foster [mailto:pa...@quillandmouse.com]
> > Sent: Tuesday, January 26, 2010 7:05 PM
> > To: php-general@lists.php.net
> > Subject: [PHP] Magic Methods not
t's called, which usually
isn't necessary and adds time. Instead, work out the number of items
before going into the loop and simply refer to that for the number of
items in controlling the loop.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
d an "umlaut".
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
re I tackle a full-on "pretty" OO solution.
(The other reason I'd do it this way is that I used to work for a
company that sold a report-writer coded in C. I never realized the
complexities of reports until I'd worked with that product for a while.
Subtotal levels, grand total levels, headers, footers, column labels,
gathered from a variety of COBOL, C, BASIC and other databases. Ugh.)
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
uotes will not be evaluated, whereas those
within double quotes will be.
What these tips are about is coding things using best practices, derived
from logical examination of the way PHP is advertised to function, not
transitory benchmarks.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ious email, I wouldn't
store the results of a query in a database. If you find you simply must
save the results, just jam the whole HTML page into a string and store
that (unless I'm misunderstanding what you're doing). Otherwise, just
generate the report in real time.
Paul
--
Paul M.
On Thu, Jan 28, 2010 at 10:49:17AM -0500, Robert Cummings wrote:
> Paul M Foster wrote:
>> On Thu, Jan 28, 2010 at 01:31:30AM -0800, Allen McCabe wrote:
>>
>>
>>
>>> SIDE QUESTION: What do you think of my use of serialization? I don't see a
>>>
I just got this image of all of us at a table at the local Chili's
twirling around in place like dogs, trying to find our asses.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ite an opening tag, i immediately write the closing tag
> >next, then cursor back to fill it in.
>
> Not so easy when you are using PHP to generate a complex layout!
Use heredocs to do it. Then you can generate the layout in PHP and still
do what deal...@gmail.com said.
Paul
--
Paul M
class around the PDO classes, which will take
care of quoting, etc.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
pinion is
that a programmer should learn the SQL dialect he's working with and use
it, rather than something like Active Record. Internally we use
PostgreSQL exclusively. The only time I use MySQL is for customer sites
where their hosting companies don't support PostgreSQL. In that case, I
simply write SQL targetted at MySQL's dialect. It all goes through the
same database class to perform error checking and results return.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
;)
For MySQL I would agree. But I prefer the ability to use the full SQL
standard when manipulating a database; that is, all joins, foreign keys,
etc. For that same reason, I tend to avoid stored procedures as well. If
I have to do things like handle foreign key constraints in my PHP code
(ins
(all with an insert for stats purposes)
> for a few weeks handles the getMax issue, and i see i did use mysql's
> auto_increment there.
>
> i suppose the difference in syntax between sql servers for this one is
> acceptable.
Am I the only one who's seeing Rene's repl
dations.
Programming PHP by Lerdorf, Tatroe, MacIntyre (O'Reilly)
http://php.net/manual/en/
For object oriented PHP code,
PHP In Action: Objects, Design, Agility by Reiersol, Baker, Shiflett
(Manning)
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
able to do something like this (I'm using SESSION
variables because cookies are more complicated):
...
...
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ng like this is if I were using native
PHP functions and the possible failure of the functions wouldn't matter.
Rather, I'd do something like this:
$d = funcD($q);
// tests if necessary
$c = funcC($p);
// tests if necessary
$b = funcB($c);
// tests if necessary
$r = funcA($b, $d);
6 for Google Apps. You may not use Google Apps (I don't), but
as Google goes, so will go the internet, eventually.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
r file. As for apache, I
suspect you're stuck with calculating intervals to determine the flag,
as described above.
Maybe someone else has a better idea.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
in the context of a field name should instead be interpreted
as a function call. Buy maybe that's just me.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ould we care about other
players in the market? Just buy our crap and you won't have to worry
about our formats." (Except until the next upgrade.)
I think ISO's policy should be that if you're a company forwarding a
standard, your off-the-shelf software should verifiably duplicate that
standard. Otherwise, go pound sand. Same if you're a community proposing
a standard. Produce some software which adheres to that standard or shut
up.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and must
accommodate some seriously obfuscated code. Which it does reliably.
Besides, if you've got a parser which understands joins, parsing things
like the distinction between hour (field name) and hour (function call)
is a piece of cake.
If a programmer working for me tried to pawn this o
gistration to download anything. I imagine that the registration
allows Manuel to tightly monitor site usage in a variety of ways.
But I don't know of another, better, resource for PHP code written by
random developers anywhere. I'm willing to give his site a plug when
someone can't find a
ent, but I'm too busy
writing code to worry about that much.
I will say this though: if you're on a list like this and someone
materially assists you with their advice, it would be a nice courtesy to
just write back and thank them. It also helps let others know that this
particular piec
www.phpclasses.org/design/turn/2/theme/igd01.html
>
> If you cannot see it yet, the author left a preview on their site:
>
> http://www.intergraphicdesigns.com/clients/phpclasses/
Muuuuch better.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscr
fight with you later about the code. And if
I submit a patch to your project, you're free to do as you like with the
code and its copyright.
By the way, I am *not* saying Manuel does this. I'm just commenting on
Rene's post.
Paul
--
Paul M. Foster
--
PHP General Mailing List (h
've ever seen, besides insisting
on a registration/login, has ever been satisfactory. The above is a
real-world example of this in action. And as Manuel details, it has
some definite benefits to users and developers.
Again, having to register/login is a pain. But ads are a pain, too. It
he same between
the two licenses, but Linus has some issues with some of the provisions
of GPLv3. Other projects have wanted to change licenses for whatever
reason, but where the copyrights are owned by a variety of people,
getting them all to agree on the change has been a problem.
Paul
--
Paul
gt;
> I'm trying to adopt this piece of code for my use. I fixed the csv_data .=
> trim error. Does anyone know how I can fix empty fields? Everything is
> dumping to a csv file but information is not matching up. I don't know if I
> can insert a space or something if field
0; $i < $numitems; $i++) {
if ($i % 2 == 0) {
$saved_key = $a[$i];
}
elseif ($i % 2 == 1) {
$b[$saved_key] = $a[$i];
}
}
Code is crude and untested, but you get the idea.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Paypal $20 to Chris
> himself if that remains my only option! Chris, what say you? (CCed)
Wow, that sucks! This is an O'Reilly book. Perhaps they would ship to
Israel?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t operation as though it's a static
one-sided conversation. I'm not an expert, but SMTP conversations don't
normally work this way. You issue the HELO, wait for the response, issue
other commands, wait for the response, etc. The way you're doing it, if
your SMTP conversation runs into any snags (like the RCPT TO is not
recognized), you won't know it. Your function will simply ride over the
error, because it's not listening to the SMTP server.
Again, I'm not an expert, so maybe there's something I've overlooked.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Using MySQL 5.075, PHP 5.25 on Debian unstable.
Has anyone noticed, when issuing a PDOStatement::rowCount() call after a
DELETE, UPDATE or INSERT, the return is uniformly zero, rather than the
actual number of rows affected?
If so, is there a simple workaround?
Paul
--
Paul M. Foster
--
PHP
On Mon, Feb 22, 2010 at 08:18:25PM -0700, Nathan Nobbe wrote:
> On Mon, Feb 22, 2010 at 7:50 PM, Paul M Foster
> wrote:
>
> Using MySQL 5.075, PHP 5.25 on Debian unstable.
>
> Has anyone noticed, when issuing a PDOStatement::rowCount() call after a
> DELETE,
On Mon, Feb 22, 2010 at 09:50:30PM -0500, Paul M Foster wrote:
> Using MySQL 5.075, PHP 5.25 on Debian unstable.
>
> Has anyone noticed, when issuing a PDOStatement::rowCount() call after a
> DELETE, UPDATE or INSERT, the return is uniformly zero, rather than the
> actual number o
to JOE. Pffft. Real men use Vim. And Emacs is for
Martians with ten fingers on each hand.
And yeah, for what it's worth, I've been running Linux since 1996.
And yeah, cats are smarter than dogs.
Flame on! ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
'element8');
>>
>> In the above line, can someone tell me what "check" means?
>
>
> In the above, check is a function. It is being called with parameter
> 'element8'.
This is true. But perhaps more importantly, check() is not a native PHP
fu
ate PDO classes only complicates the
interface to the library.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
what we got was arguments from people who took
exception one way or another.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
method()}";
Um, not exactly. "This will parse correctly: $_SERVER[DOCUMENT_ROOT]."
You just can't use single quotes inside the brackets to denote the array
index, when the whole string is surrounded by double quotes. A more
pedestrian example:
$message = "The value of foo i
r(10)
You can easily subset by voter, or by question ID. Or analyze answers in
relation to other answers, etc.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
on this list for a long time, and his skills are plenty
adequate for this task. He's just asking for second opinions.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
seem sensible? Or overkill?
>
> Thanks again for your help in this, it's quite novel for me.
I would think that the PHP CLI extension would need to be installed on
the server for this to work. I don't know that that's common. (I could
be completely wrong.)
I would recommend
ssy. So I finally wrote a C utility which parses the file and yields
tab-delimited records without the quotes.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
width of all the
fields in a file. And a simple explode() call allows pulling all the
fields into an array, based on a common delimiter.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
301 - 400 of 706 matches
Mail list logo