Re: [PHP] Friday's Question

2013-09-20 Thread Mattias Thorslund
40, and no mouse pad atm. Seems that this table top is okay. This is an optical mouse without a ball underneath. However this mac-y-mouse DOES have a ball on top, for scrolling. Go figure. Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] A relative date puzzle

2013-04-01 Thread Mattias Thorslund
On 4/1/13 11:15 AM, Mattias Thorslund wrote: On 4/1/13 11:05 AM, Jim Giner wrote: I'm looking for some ideas on how to handle the following get a datetime value that is relative to a specific future date when presented with a partial day &time value. Specifically, I have an

Re: [PHP] A relative date puzzle

2013-04-01 Thread Mattias Thorslund
NIX time stamp, then use date() to format it as you like. $myDate = strtotime("wed 11:00 am"); //1365012000 echo date("Y-m-d H:i:s", $myDate); //2013-04-03 11:00:00 On two lines for clarity. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] crash dump on OS X Server: PHP / Apache

2012-10-09 Thread Mattias Thorslund
erver, using the same FileMaker API is running just fine, but that one isn't using CodeIgniter. Any insight would be greatly appreciated. Mattias Process: httpd [9018] Path:/usr/sbin/httpd Identifier: httpd Version: ??? (???) Code Type: X86-64 (Native) Pare

Re: [PHP] Help on number matching function

2011-09-16 Thread Mattias Thorslund
If one or both of your data sets are in MySQL already, there may be no need to do the comparison in PHP. Just use IN() or INNER JOIN. Or is there some particular reason why neither of these will work in your case? Cheers, Mattias On 09/16/2011 05:36 AM, Dare Williams wrote: Dear PHP Group

Re: [PHP] How to PHP get bit depth of a given PNG image file?

2011-06-16 Thread Mattias Thorslund
I think the documentation is a bit unclear about the fact that "colors" and "channels" are the same thing here. The line about bits should probably say "bits is the number of bits for each *channel*". Mattias On 06/15/2011 11:11 PM, Nam Gi VU wrote: Thank you Ma

Re: [PHP] How to PHP get bit depth of a given PNG image file?

2011-06-15 Thread Mattias Thorslund
mage. Reading the manual, it says: " channels will be 3 for RGB pictures and 4 for CMYK pictures. bits is the number of bits for each color. " So, to get the total bit depth, I think you need to multiply by the number of colors, which is in the "channels" element. Cheers

RE: [PHP] Bar Charts in PDFs

2011-02-11 Thread Mattias Geniar
Hi Tom, Have a look at the library called 'pChart': http://pchart.sourceforge.net/ While it's a bit old, it generates very nice looking (anti aliased) charts, using the default GD library. Regards, Mattias -Original Message- From: Tom Barrett [mailto:t...@miramedia.co.uk]

Re: [PHP] floored by floor()

2010-10-14 Thread Mattias Thorslund
On 10/13/2010 11:14 PM, Glen Fuller wrote: On 10/13/2010 10:48 PM, Mattias Thorslund wrote: Hi List, I'm having a problem with the behavior of the floor() function: echo floor(327.03 * 100)."\n"; //prints "32702" and not "32703"!! Sanity check: var_dump(3

Re: [PHP] floored by floor()

2010-10-14 Thread Mattias Thorslund
On 10/13/2010 11:56 PM, gaojian wrote: 在 2010-10-13三的 22:48 -0700,Mattias Thorslund写道: Hi List, I'm having a problem with the behavior of the floor() function: echo floor(327.03 * 100)."\n"; //prints "32702" and not "32703"!! Sanity check: var_dump(3

[PHP] floored by floor()

2010-10-13 Thread Mattias Thorslund
Hi List, I'm having a problem with the behavior of the floor() function: echo floor(327.03 * 100)."\n"; //prints "32702" and not "32703"!! Sanity check: var_dump(327.03 * 100); //prints "float(32703)" as expected Any ideas why this happens,

Re: [PHP] Sort two coupled arrays

2010-04-07 Thread Mattias Thorslund
has to be a better/slicker way. Suggestions? Cheers, tedd array_combine($key_array, $value_array) :) -- Piero And then: krsort($combined_array); Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Mattias Thorslund
also help you convert your database from one platform to another, since it also provides methods for detecting and managing the database structure itself (the Manager and Reverse modules). That said, if I were to start a new project at this time, I would look closer at whether PDO fits my needs.

Re: [PHP] Spreadsheet_Excel_Reader problem

2010-03-18 Thread Mattias Thorslund
() didn't work for you? http://www.php.net/fgetcsv Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Mattias Thorslund
Kim Madsen wrote: Mattias Thorslund wrote on 09/01/2010 02:26: A neat thing with pairing every when mixed in HTML is that these are valid XML processing instructions. If your HTML satisfies XML well-formedness, your PHP document will also be valid XML. Not that I've ever had any ne

Re: [PHP] Formatting Decimals

2010-01-11 Thread Mattias Thorslund
look like: Actual Rounded Diff .011 .010-.001 .012 .010-.002 .013 .015+.002 .014 .015+.001 .015 .015 .000 .016 .015-.001 .017 .020-.002 .018 .020+.002 .019 .020+.001 .020 .020 .000 Bias.000 The only difference is the case wh

Re: [PHP] Formatting Decimals

2010-01-10 Thread Mattias Thorslund
.@mumin:~$ php -r 'echo "$".number_format("0.109", 2, ".", ",")."\n";' $0.11 I think the $ should be escaped with a backslash when enclosed within double quotes, but even the second and third tries return the correct result for me. U

Re: [PHP] POLL: To add the final ?> or not...

2010-01-08 Thread Mattias Thorslund
tes as XML but anyway. Cheers, Mattias Daevid Vincent wrote: I'm having a debate with a co-worker about adding the final ?> on a PHP page... To be honest, I am the lead, and I could pull rank and be done with the discussion, however I don't like to be that way. I would rather do t

[PHP] Resin/Quercus

2010-01-06 Thread Mattias Thorslund
Hi, I wonder if anyone has experience with running PHP on the Resin server. Opinions, good, bad? Gotchas? Similar projects? http://www.caucho.com/projects/resin/ Thanks, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Server-side encryption to prevent form hacking: new idea?

2009-12-11 Thread Mattias Thorslund
es aren't limited to a small set, so it's more practical to check for expected length, data type, and escape the data before saving it. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Time zone discrepancy - America/New_York = CDT?

2009-11-01 Thread Mattias Thorslund
The output I get (after adding newlines to the output) is: America/New_York EST EST EST PHP 5.2.10. I suspect this comes from the operating system. Maybe update your tzdata package if you're on a Linux system. Cheers, Mattias Nathan Lebovic wrote: Sorry there was a typo in that o

[PHP] SimpleXML var_dump() weirdness

2009-10-13 Thread Mattias Thorslund
SimpleXMLElement)#1 (2) { ["@attributes"]=> array(1) { ["rootattr"]=> string(10) "root value" } ["inner"]=> object(SimpleXMLElement)#2 (2) { ["@attributes"]=> array(1) { ["attr"]=> string(5) "value&q

Re: [PHP] Extract links from strings

2009-09-21 Thread Mattias Thorslund
he URL from these strings? They can be [http:// + url] or [www. + url]. Zechim Simple: function RemoveLorem($string) { return str_replace(array('Lorem ipsum dolor ', ' sit amet'), '', $string); } $url1 = RemoveLorem($string1); $url2 = RemoveLorem($string2); $u

Re: [PHP] Validating XML Issue

2009-09-03 Thread Mattias Thorslund
I'd say your XML document is not "well formed", but validity depends on whether it conforms to the rules expressed in a schema. Mattias Alice Wei wrote: Hi, This seems like a small problem that I have read from http://us.php.net/manual/en/xmlreader.isvalid.php. I have t

Re: [PHP] APC optimization in CLI

2009-08-09 Thread Mattias Thorslund
named apc.enable_cli, which would suggest otherwise. I tried enabling it, and it seems my CLI script is a little faster actually. Highly unscientific but looks like about 10%. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Script to Compare Database Structures

2009-08-02 Thread Mattias Thorslund
Look into the Reverse module of PEAR MDB2. http://pear.php.net/manual/en/package.database.mdb2.intro-reverse-module.php Cheers, Mattias Matt Neimeyer wrote: I know I CAN hack something together but I hate to reinvent the wheel. I want to be able to compare the structure of two different

Re: [PHP] Best way to deal with $_SERVER['REQUEST_URI'] on IIS?

2009-04-21 Thread Mattias Thorslund
Andrew Ballard wrote: On Tue, Apr 21, 2009 at 4:04 PM, Mattias Thorslund wrote: Hi all, Apparently, $_SERVER['REQUEST_URI'] doesn't get set the same way when running PHP on IIS as when running it on Apache. Specifically, it seems to contain the script name only, and not t

[PHP] Best way to deal with $_SERVER['REQUEST_URI'] on IIS?

2009-04-21 Thread Mattias Thorslund
users who encounter the same thing, so the easier the instructions and the less tinkering, the better. Is there a php.ini setting, for instance? What have you found that works for you? Thanks, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Handling (very) large files with PHP

2009-03-11 Thread Mattias Thorslund
epend a bit on the quality and consistency of your data. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Sorting times

2009-02-15 Thread Mattias Thorslund
account for that, you solution won't be as elegant. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Global Changes With Loop To Allow Nulls In A Table...

2009-01-27 Thread Mattias Thorslund
eems to be. Cheers, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Php error

2009-01-24 Thread mattias
ERR_DB_NO_DB_PASS What will this meen? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] About printing functions

2009-01-21 Thread Mattias Thorslund
e function itself? And store the "blah blah blah" somewhere for later use? I can think of many reasons that someone could use this. Perhaps you are looking for what the output buffering functions do? http://us3.php.net/manual/en/book.outcontrol.php Cheers, Mattias -- PHP Genera

Re: [PHP] Re: hello - thread on topic or not?

2009-01-08 Thread Mattias Thorslund
I thought this was the PHP list, not the OS vs. OS list? Is this type of discussion now considered OK here? I recall people getting flamed for borderline off-topic posts even, just a few years ago. Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Using MDB2 outside the PEAR framework?

2008-12-26 Thread Mattias Thorslund
As far as I recall, having done this, all that is required for a basic MDB2 is the PEAR base class and the driver classes for the platforms you want to support. Murray wrote: Hi All, I'm wondering if it's possible or practical to implement MDB2 in my web application, but without requiring a

Re: [PHP] PHP-CLI and the "less" command (kubuntu)

2008-07-02 Thread Mattias Thorslund
Stut wrote: On 2 Jul 2008, at 02:58, Mattias Thorslund wrote: Hi everyone, I have a CLI application that produces lots of output to the terminal, so I like to send the output along to the "less" command. This has always worked very nicely. Moving to the top or bottom of the outp

[PHP] PHP-CLI and the "less" command (kubuntu)

2008-07-01 Thread Mattias Thorslund
;s worth asking here. Did something about PHP CLI output change lately? My test script: Execute like so: $ php test.php | less First time might work without problem, but subsequent times not. Thanks for any feedback and observations. Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mnoGoSearch and similar

2008-05-21 Thread Mattias Thorslund
Dmitri wrote: Mattias Thorslund wrote: Hi, I'm looking at possibly implementing mnoGoSearch (for indexing and search of uploaded documents on the server) into my application, but noticed it has been moved into PECL since PHP 5.1. Does this mean mnoGoSearch has been deprecated and the

[PHP] mnoGoSearch and similar

2008-05-21 Thread Mattias Thorslund
hould consider first? Thanks, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

SV: SV: SV: [PHP] Sql support

2008-01-25 Thread mattias
hereis my php.ini i think this file are correct [PHP] ;;; ; About php.ini ; ;;; ; This file controls many aspects of PHP's behavior. In order for PHP to ; read it, it must be named 'php.ini'. PHP looks for it in the current ; working directory, in the path desig

SV: SV: [PHP] Sql support

2008-01-24 Thread mattias
yes but if you check my phpinfo.php http://mjw.se/phpinfo.php i can't reed out if sql support are enabled -Ursprungligt meddelande- Från: Chris [mailto:[EMAIL PROTECTED] Skickat: den 25 januari 2008 01:18 Till: mattias Kopia: php-general@lists.php.net Ämne: Re: SV: [PHP] Sql su

SV: [PHP] Sql support

2008-01-24 Thread mattias
oops sorry i meen sql -Ursprungligt meddelande- Från: Chris [mailto:[EMAIL PROTECTED] Skickat: den 25 januari 2008 00:06 Till: mattias Kopia: php-general@lists.php.net Ämne: Re: [PHP] Sql support mattias wrote: > I try to add php-support to my php installation on windows 2000 server

[PHP] Sql support

2008-01-24 Thread mattias
I try to add php-support to my php installation on windows 2000 server Can someone check my phpinfo.php? http://mjw.se/phpinfo.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

SV: SV: [PHP] Mail system

2007-12-30 Thread mattias
Yes but i are newbie in php I think i should use php exec but i dont know no more -Ursprungligt meddelande- Från: Stut [mailto:[EMAIL PROTECTED] Skickat: den 30 december 2007 22:01 Till: mattias Kopia: php-general@lists.php.net Ämne: Re: SV: [PHP] Mail system mattias wrote: > First

SV: [PHP] Mail system

2007-12-30 Thread mattias
First of all If you have a bad day don't send to the list -Ursprungligt meddelande- Från: Stut [mailto:[EMAIL PROTECTED] Skickat: den 30 december 2007 21:46 Till: mattias Kopia: php-general@lists.php.net Ämne: Re: [PHP] Mail system mattias wrote: > If i run coureir and pos

[PHP] Mail system

2007-12-30 Thread mattias
If i run coureir and postfix I want to have a signup script How should the code be written? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

SV: [PHP] Re: Php exec

2007-12-23 Thread mattias
? mattias schreef: > If i use courier-mta > Can i create a php script wich create mailboxes? > And users > Hope any understand -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To

[PHP] Php exec

2007-12-23 Thread mattias
If i use courier-mta Can i create a php script wich create mailboxes? And users Hope any understand -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Web Service with PHP4 suggestions wanted.

2007-08-16 Thread Mattias Hakansson
e not any longer maintaining the source ? since the last update was > 2 years ago. Thanks very much for your time, Mattias Hakansson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What can cause session_destroy to fail? -- thanks!

2007-06-12 Thread Mattias Thorslund
Richard Lynch wrote: > On Mon, June 11, 2007 8:36 pm, Mattias Thorslund wrote: > >> One of my clients just received a PHP warning that session_destroy() >> failed. Using the default session handler (with tmp files), what are >> the >> most likely things that

Re: [PHP] What can cause session_destroy to fail?

2007-06-12 Thread Mattias Thorslund
Jim Lucas wrote: > Mattias Thorslund wrote: >> Jim Lucas wrote: >>> Mattias Thorslund wrote: >>>> Hi, >>>> >>>> One of my clients just received a PHP warning that session_destroy() >>>> failed. Using the default session handler (w

Re: [PHP] What can cause session_destroy to fail?

2007-06-12 Thread Mattias Thorslund
Jim Lucas wrote: > Mattias Thorslund wrote: >> Hi, >> >> One of my clients just received a PHP warning that session_destroy() >> failed. Using the default session handler (with tmp files), what are the >> most likely things that can cause session_destroy() to r

[PHP] What can cause session_destroy to fail?

2007-06-11 Thread Mattias Thorslund
Hi, One of my clients just received a PHP warning that session_destroy() failed. Using the default session handler (with tmp files), what are the most likely things that can cause session_destroy() to return false? Thanks for any suggestions. Mattias -- PHP General Mailing List (http

Re: [PHP] Re: What does "<<<" mean?

2007-05-01 Thread Mattias Thorslund
Robert Cummings wrote: > On Tue, 2007-05-01 at 08:36 -0700, Mattias Thorslund wrote: > >> Man-wai Chang wrote: >> >>> Bash uses only 2. PHP uses 3. And I am using this: >>> >>> $sql=" >>> select ... >>>

Re: [PHP] Re: What does "<<<" mean?

2007-05-01 Thread Mattias Thorslund
s wrap lines to the correct level, which is also much more readable, so what I'm thinking of is a bit similar to that. Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] location of the PHP executable

2007-04-11 Thread Mattias Thorslund
gt; it's just a thought. > > > Unfortunately, I think it's not an option in my case. The sub-process I run this way are way, way too big to include in the main process. As long as I was just running it on my own systems, it was easy to hard-code the location of the PHP executable but now that it's being distributed, it needs to "just work"... Thanks again, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] location of the PHP executable

2007-04-11 Thread Mattias Thorslund
Jim Lucas wrote: > Mattias Thorslund wrote: >> Hi, >> >> I have looked in the documentation but can't find it: >> >> My PHP script (which is run from the command prompt - CLI) needs to know >> the file system location of the PHP executable. This is becau

[PHP] location of the PHP executable

2007-04-11 Thread Mattias Thorslund
not available in all OSes, and that might not be the currently running executable anyway. I could prompt the user for this, but that seems kind of silly. Surely, there must be some way of looking it up automatically? Thanks, Mattias -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] XML Parsing, starting out.

2006-04-29 Thread Mattias Thorslund
sociative array. I'm using something similar myself, as it seems to be a pretty straightforward way to get an easy-to-use structure in PHP 4 without dom_xml, which isn't always available. Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP and CakePHP

2006-03-30 Thread Mattias Thorslund
ually empty? To see if that's the case, you could temporarily change your code to: > > $datetime->time2str($info['Employee']['dob']) : "it's empty!!"?> > HTH, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: verification of mail success

2006-02-23 Thread Mattias Thorslund
ld be used for my purpose, i.e. has the message been processed yet, is there a temporary or permanent delivery problem, etc. I don't see how the PHP function would be able to get the message ID of the message it just handed over to the MTA. I guess one way would be to implement a queue of my own, and use the "direct SMTP" approach to deliver messages. /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] verification of mail success

2006-02-23 Thread mattias
ctically valid) name returned "success"... Running mailq at the command prompt gives me: "(Host or domain name not found. Name service error for name=activeagenda.org type=MX: Host not found, try again)" Basically, I'd like my PHP script to know of issues like these.

Re: [PHP] web database template

2006-02-14 Thread mattias
CRIBE ; or: SHOW CREATE TABLE ; The second of these will give you a CREATE TABLE sql statement which would create that table. Best, Mattias Thorslund, http://www.activeagenda.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

SV: [PHP] Upload with process meter

2006-01-02 Thread Mattias Segerdahl
Martin, There is no native support in php for this today. That said, it's not impossible to do. There are two different approaches you can take. The easy one, is to use PDoru's patch at http://pdoru.from.ro/ The second one, which I experimented with the other week, is to set the wrong enctype, re

[PHP] Reverse destruction

2006-01-02 Thread Mattias Segerdahl
Is it possible to reverse class __destruct() instead of following the class initiations? It makes more sence to me to close objects in last start first close. Would output, Constructing Class1 Constructing Class2 Constructing Class3 Destructing Class1 Destructing Class2 Destructing Class3 I'd

SV: [PHP] PHP programmers from hyderabad

2005-12-18 Thread Mattias Segerdahl
Hyderabd, India? Would you stop flaming the list with these requests? Looking at your website, not a single experienced programmer would even consider applying to the job mentioned. Not only does the website look like it's made by someone with the know-how of a thirteen year old kid but the compa

Re: [PHP] Re: Templating engines

2005-04-29 Thread Mattias Thorslund
Rasmus Lerdorf wrote: Mattias Thorslund wrote: Who says PHP itself is a template engine? I think nobody. I do. It comes down to whether you want the delineation between the template and the business logic enforced by the system or not. PHP is a general-purpose templating system that does not

Re: [PHP] Re: Templating engines

2005-04-29 Thread Mattias Thorslund
Jason Barnett wrote: Mattias Thorslund wrote: ... Who says PHP itself is a template engine? I think nobody. What are the "basic template features"? Variables / placeholders Looping construct(s) Conditionals A way to apply styles to text / markup So I suppose I'm just con

Re: [PHP] Re: Templating engines

2005-04-29 Thread Mattias Thorslund
Richard Lynch wrote: Who says PHP itself is a template engine? I do. More importantly, Rasmus does. What? My li'l brother does PHP? Or you mean him Lerdorf? Sorry... /Mattias -- More views at http://www.thorslund.us

Re: [PHP] Re: Templating engines

2005-04-29 Thread Mattias Thorslund
ssi.com/php/articles/template_engines/ Best regards, Mattias -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Templating engines

2005-04-29 Thread Mattias Thorslund
rush wrote: "Mattias Thorslund" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] (On the subject of templating engines, again.) I wonder what you folks think of the following: http://www.massassi.com/php/articles/template_engines/ hi! It is nicely written, but a

Re: [PHP] Templating engines

2005-04-28 Thread Mattias Thorslund
he actual template language. I haven't used in a production setting yet, and haven't compared its performance with other template systems. /Mattias P.S. Sorry for hijacking this thread, but it's closely related. OK, I wrote that before I read all the off-topic jokes in this thread. I

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Unexpected T_IF

2005-04-25 Thread Mattias Thorslund
ery($sql)) ) (snipped the rest of the code) Check that the line BEFORE the if statement ends with a semicolon (or otherwise ends correctly...). /Mattias -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Links exchange with http://php-faq.com. OT - SPAM

2005-04-19 Thread Mattias Thorslund
It would be nice if the above piece of blatant spam were removed from the archives, since the spammer's objective most likely is to improve their Google rank... Possible? /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Date class

2005-04-19 Thread Mattias Thorslund
lcome. Thanks for your time in advance. Devraj Have you looked at the PEAR Date class? http://pear.php.net/package/Date /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] How do I get the first element's key of an array of objects?

2005-04-08 Thread Mattias Thorslund
Chris W. Parker wrote: Read www.php.net/array_keys and you shall have your answer. From the php docs: $array = array(0 => 100, "color" => "red"); print_r(array_keys($array)); ?> Will output. Array ( [0] => 0 [1] => color ) Duh! Yes, I replied a li

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] How do I get the first element's key of an array of objects?

2005-04-07 Thread Mattias Thorslund
eys($object_array); $first_key = reset($keys); /Mattias -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SQL ternary thing

2005-04-06 Thread Mattias Thorslund
ement, but I believe that's not supported by other DBMS's. Something like: SELECT name, CASE value WHEN 1 THEN name_if_true WHEN 0 THEN name_if_false ELSE 'unknown' END AS result FROM thing; /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Interesting, yet goofy behavior

2005-04-06 Thread Mattias Thorslund
have to find another way around the situation then. Thanks! How about: If your Form tag appears after your switch/case statement, that is? But, first, do yourself and your project a favor and go grab something to eat. :-) /Mattias -- PHP General Mailing List (http://www.php.net/) To uns

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Interesting, yet goofy behavior

2005-04-06 Thread Mattias Thorslund
ot; attribute of the form tag. Actually I wonder how much alcohol you've had by now... :-) /Mattias Jay Blanchard wrote: Let's say I have a form and the action is thus; \n"; Note the 'bid' attribute. Now, I have a case statement in which stuff takes place since the form

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Include file

2005-03-30 Thread Mattias Thorslund
an substituting double quotes with single quotes. /Mattias Thorslund -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: Help with dates

2005-03-06 Thread Mattias Thorslund
Check out: http://pear.php.net/package/Date According to the description, it lets you compare dates that date pre 1970 and post 2038. /Mattias (If I could only get off ezmlm's "suspicious user list". I think there isn't much I can do, it's my ISP rejecting some PHP lis

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Re: Help with dates

2005-03-06 Thread Mattias Thorslund
nstant somewhere :) Can't be too hard to calculate it: 1970 * 365 + 1 day for each leap year. Note the rules for leap year, of course. /Mattias -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] 'Insulate' db connection

2005-03-06 Thread Mattias Thorslund
Since you can use fopen, I don't think open_basedir is the problem. Read about open_basedir here: http://us3.php.net/features.safe-mode Maybe the path that you use in the include is wrong? /Mattias Andre Dubuc wrote: Hi, I am trying to 'insulate' my database connection from prying

Re: [PHP] sentence case

2005-02-23 Thread Mattias Thorslund
Leif Gregory wrote: Hello Chris, Wednesday, February 23, 2005, 11:49:32 AM, you wrote: C> And on top of that he'll need to convert all 'i' to 'I' because of C> step 1. You and Mattias both have valid points. The only other thing I can think of is a regexp that is sea

Re: [PHP] sentence case

2005-02-23 Thread Mattias Thorslund
Chris W. Parker wrote: Leif Gregory on Wednesday, February 23, 2005 10:31 AM said: I'm thinking something like: 1. strtolower() the string 2. explode() on the period 3. Loop through the resulting array a. trim() whitespace on each element b. ucfirst() on each el

Re: [PHP] Help with a query please - unable to error check!

2005-02-16 Thread Mattias Thorslund
Could it be a quote-escaping problem? It would be easier to tell if you could show us the query and the code you're using. /Mattias Shaun wrote: Hi, I have a problem with a query, I get the following error message: You have an error in your SQL syntax. Check the manual that corresponds to

Re: [PHP] Primer for working with arrays

2005-02-09 Thread Mattias Thorslund
pters. /Mattias -- More views at http://www.thorslund.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strange in MySQL Query.

2005-01-15 Thread Mattias Thorslund
... I dont know why .. is this mysql bug ? It's a known bug in MySQL. Since this is a PHP list, I leave it up to you to check what version fixed it. IIRC, it's possible to work around by making sure the first statement has the longest data type. -- More views at http://www.thorslund.us -- PHP

Re: [PHP] Form Validation

2004-10-13 Thread Mattias Thorslund
e the data in your PHP script as you process the form. Oh, and there are several PHP-based list managers available, for instance phplist, so you may not need to program it yourself. /Mattias Huang, Ou wrote: I am currently working on a newsletter mailing list project and developed a form in p

Re: [PHP] Re: Recommendations for php email list managers?

2004-09-21 Thread Mattias Thorslund
Matthew Weier O'Phinney wrote: * Mattias Thorslund <[EMAIL PROTECTED]>: I'm trying to set up a list manager on a hosted site. PHPlist (phplist.com) seemed promising but I read on their forums that it takes some users hours and hours to send a couple thousand emails. Without

Re: [PHP] Re: Recommendations for php email list managers?

2004-09-21 Thread Mattias Thorslund
Manuel Lemos wrote: Hello, On 09/21/2004 04:17 PM, Mattias Thorslund wrote: I'm trying to set up a list manager on a hosted site. PHPlist (phplist.com) seemed promising but I read on their forums that it takes some users hours and hours to send a couple thousand emails. Without ter

[PHP] Recommendations for php email list managers?

2004-09-21 Thread Mattias Thorslund
send my newsletter. It's supposed to be an announcement-only list, BTW. /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] RE: Correct context

2004-09-20 Thread Mattias Thorslund
Jay Blanchard wrote: Oops Yeah, some of us (including myself) could use a php validator in our mail clients... Maybe a plugin for T-bird? /Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] RE: **[SPAM]** [PHP] Correct context

2004-09-20 Thread Mattias Thorslund
Mattias Thorslund wrote: Disclaimer: I have probably left a silly typo somewhere. Sure did: My old nemesis, end parethesis (either too few or too many). It should be: if("" != $row['photo_check']){ switch($entry){ case "Copy Change": case "Ba

Re: [PHP] RE: **[SPAM]** [PHP] Correct context

2004-09-20 Thread Mattias Thorslund
|| ("Price Change" != $entry))) Note the parentheses to define preference order. How about : if("" != $row['photo_check'])){ switch($entry){ case "Copy Change": case "Banner Change": case "Price Change": break; default: //put

Re: [PHP] downloading files

2004-08-19 Thread Mattias Thorslund
) /documents (put uploaded documents here) /webroot (web-accessible files here) /img(static images) /js (javascript files) Hope this helps. Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SQL Join query

2004-08-09 Thread Mattias Thorslund
(Sorry about all the quoting but I thought it makes sense for clarity - Mattias) Curt Zirzow wrote: * Thus wrote Lenar Lhmus: Mattias Thorslund wrote: Though, (regardless of SQL database platform) in a case like this, it MAY be both more straightforward and efficient to use two separate

Re: [PHP] SQL Join query

2004-08-07 Thread Mattias Thorslund
ount(*) AS num_comments FROM pic_comments GROUP BY pic_id You may want to add an ORDER BY clause to both of these. People often say it's 'good form' to enumerate your fields in the SELECT clause but benefits of that may vary between database platforms. Mattias Thorslund -- PHP G

[PHP] SQL Join query

2004-08-07 Thread Mattias Jönsson
I have a problem with my mysql query SELECT pics.*, pic_comments.*, count(*) AS num_comments FROM pics, pic_comments WHERE pics.category = 1 AND pics.id = pic_comments.pic_id GROUP BY pic_comments.pic_id; pics table: | id | submitter | time | date | category | pic_comments table: | pic_id | comm

  1   2   >