php-general Digest 18 Jun 2010 19:51:18 -0000 Issue 6805

2010-06-18 Thread php-general-digest-help
php-general Digest 18 Jun 2010 19:51:18 - Issue 6805 Topics (messages 306243 through 306245): Specifying endianness in Cross-Compiling PHP 306243 by: Naga Kiran K Re: Date Conversion Problem 306244 by: David Stoltz stripping first comma off and everything after

[PHP] Specifying endianness in Cross-Compiling PHP

2010-06-18 Thread Naga Kiran K
Hi, We are cross-compiling PHP for PowerPC,Octeon platforms from FreeBSD machine. As we need to specify that PowerPC,Octeon platforms are big-endian during cross-compilaintion. Please suggest the best location to specify this endianness during compilation phase. Thanks, Naga Kiran

RE: [PHP] Date Conversion Problem

2010-06-18 Thread David Stoltz
No Problem Shreyas, My original PHP code was writing the date like this: echo date('l jS \of F Y h:i:s A'); // - Thursday 17th of June 2010 08:58:02 AM I changed it to this: echo date('n\/j\/Y h:i:s A');// - 6/17/2010 08:58:02 AM Now that it was writing to the database correctly,

[PHP] stripping first comma off and everything after

2010-06-18 Thread Adam Williams
I'm querying data and have results such as a variable named $entries[$i][dn]: CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92,OU=XXf,OU=XX,OU=X,DC=,DC=xx,DC=xxx Basically I need to strip off the first command everything after, so that I just have it

Re: [PHP] stripping first comma off and everything after

2010-06-18 Thread Robert Cummings
Adam Williams wrote: I'm querying data and have results such as a variable named $entries[$i][dn]: CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92,OU=XXf,OU=XX,OU=X,DC=,DC=xx,DC=xxx Basically I need to strip off the first command everything after, so

[PHP] stripping first comma off and everything after

2010-06-18 Thread Adam
I'm querying data and have results such as a variable named $entries[$i][dn]: CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92,OU=XXf,OU=XX,OU=X,DC=,DC=xx,DC=xxx Basically I need to strip off the first command everything after, so that I just have it

[PHP] Re: stripping first comma off and everything after

2010-06-18 Thread Jo�o C�ndido de Souza Neto
Why not this? $var = explode(,,$entries[$i][dn]); $var = $var[0]; Adam Williams adam_willi...@bellsouth.net escreveu na mensagem news:4c1bcf62.5070...@bellsouth.net... I'm querying data and have results such as a variable named $entries[$i][dn]:

Re: [PHP] stripping first comma off and everything after

2010-06-18 Thread Daniel P. Brown
On Fri, Jun 18, 2010 at 15:56, Adam Williams adam_willi...@bellsouth.net wrote: I'm querying data and have results such as a variable named $entries[$i][dn]: CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92,OU=XXf,OU=XX,OU=X,DC=,DC=xx,DC=xxx Basically I

[PHP] newbie sequel question: how do we search for multiple things on 1 field like:

2010-06-18 Thread Dave
SELECT * FROM contacts WHERE state = 'CA' and name = 'bob' or name = 'sam' or name = 'sara' -- Thanks - Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Replacing Registered Symbol

2010-06-18 Thread Rick Dwyer
Hello List. I'm trying to replace the registered (®) symbol from a variable via PHP. The variable $mystring is set to a MySQL field that contains the value This Is The Registered Symbol ®. Using the following, I try to replace the symbol, but it persists: $moditem =

Re: [PHP] newbie sequel question: how do we search for multiple things on 1 field like:

2010-06-18 Thread Rick Dwyer
SELECT * FROM contacts WHERE state = 'CA' and (name = 'bob' or name = 'sam' or name = 'sara') --Rick On Jun 18, 2010, at 4:30 PM, Dave wrote: SELECT * FROM contacts WHERE state = 'CA' and name = 'bob' or name = 'sam' or name = 'sara' -- Thanks - Dave -- PHP General Mailing

Re: [PHP] newbie sequel question: how do we search for multiple things on 1 field like:

2010-06-18 Thread Daniel Brown
On Fri, Jun 18, 2010 at 16:30, Dave deal...@gmail.com wrote: SELECT * FROM contacts WHERE state = 'CA' and   name = 'bob' or name = 'sam' or name = 'sara' We begin by asking on the right list (my...@lists.mysql.com, CC'd by courtesy). You're on the right track though. Try a

RE: [PHP] Replacing Registered Symbol

2010-06-18 Thread Bob McConnell
From: Rick Dwyer I'm trying to replace the registered ((r)) symbol from a variable via PHP. The variable $mystring is set to a MySQL field that contains the value This Is The Registered Symbol (r). Using the following, I try to replace the symbol, but it persists: $moditem =

Re: [PHP] Replacing Registered Symbol

2010-06-18 Thread Daniel Brown
On Fri, Jun 18, 2010 at 16:32, Rick Dwyer rpdw...@earthlink.net wrote: Hello List. I'm trying to replace the registered (®) symbol from a variable via PHP. The variable $mystring is set to a MySQL field that contains the value This Is The Registered Symbol ®. Using the following, I try to

Re: [PHP] newbie sequel question: how do we search for multiple things on 1 field like:

2010-06-18 Thread deal...@gmail.com
Thanks Daniel and Rick! I will start using this... We begin by asking on the right list (my...@lists.mysql.com, CC'd by courtesy). Thanks, Dave deal...@gmail.com [db-10] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Replacing Registered Symbol

2010-06-18 Thread Rick Dwyer
On Jun 18, 2010, at 4:52 PM, Daniel Brown wrote: Check your database's character encoding. My check: Navicat shows it as Latin1. I believe UTF-8 is what it should be, but I don't want to change it without understanding what impact it will have. Note that, while it won't make

Re: [PHP] newbie sequel question: how do we search for multiple things on 1 field like:

2010-06-18 Thread Daniel Brown
On Fri, Jun 18, 2010 at 17:06, deal...@gmail.com deal...@gmail.com wrote: I will start using this...   We begin by asking on the right list (my...@lists.mysql.com, CC'd by courtesy). It was just an end-of-the-week jab, Dave. I mean, that's the correct list to use, but the response

Re: [PHP] Replacing Registered Symbol

2010-06-18 Thread Daniel Brown
On Fri, Jun 18, 2010 at 17:07, Rick Dwyer rpdw...@earthlink.net wrote: Navicat shows it as Latin1.  I believe UTF-8 is what it should be, but I don't want to change it without understanding what impact it will have. Depending on your content, it could be an issue, but probably not. A good

Re: [PHP] Replacing Registered Symbol

2010-06-18 Thread Rick Dwyer
On Jun 18, 2010, at 5:13 PM, Daniel Brown wrote: Can you hit the database from the command line to see if there's a difference in the output when you take the server and browser out of the equation? No, I'm on Mac OS 10.5 and apparently I don't have a MySQL client installed in

Re: [PHP] Replacing Registered Symbol

2010-06-18 Thread Daniel P. Brown
On Fri, Jun 18, 2010 at 17:37, Rick Dwyer rpdw...@earthlink.net wrote: No, I'm on Mac OS 10.5 and apparently I don't have a MySQL client installed in terminal.  I've always used Navicat and never had a need for the terminal until now. Should be able to install mysql-client from ports.

Re: [PHP] Replacing Registered Symbol

2010-06-18 Thread Rick Dwyer
OK, it's definitely an encoding issue... when I change the encoding of my PHP page in BBedit to Western ISO Latin 1, it replaces successfully. --Rick On Jun 18, 2010, at 5:13 PM, Daniel Brown wrote: On Fri, Jun 18, 2010 at 17:07, Rick Dwyer rpdw...@earthlink.net wrote: Navicat shows

Re: [PHP] Re: stripping first comma off and everything after

2010-06-18 Thread shiplu
I'll use, list($data) = explode(,,$entries[$i][dn]); Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List

Re: [PHP] Re: stripping first comma off and everything after

2010-06-18 Thread Robert Cummings
shiplu wrote: I'll use, list($data) = explode(,,$entries[$i][dn]); It's probably the least efficient method. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely

Re: [PHP] Re: stripping first comma off and everything after

2010-06-18 Thread Troy Oltmanns
http://php.net/manual/en/function.split.php I haven't tested for efficiency but splitting it will be great for assigning it easily into an array. On Fri, Jun 18, 2010 at 7:42 PM, Robert Cummings rob...@interjinn.comwrote: shiplu wrote: I'll use, list($data) = explode(,,$entries[$i][dn]);

Re: [PHP] Re: stripping first comma off and everything after

2010-06-18 Thread Robert Cummings
Troy Oltmanns wrote: http://php.net/manual/en/function.split.php I haven't tested for efficiency but splitting it will be great for assigning it easily into an array. Explode does the same thing without the overhead of a regular expression engine. But the OP didn't want the rest :)