On Sat, Aug 1, 2009 at 2:11 AM, A.a.k wrote:
> Hi
> I'm trying to use clean urls in my application:
> lets say convert http://mysite/article.php?id=3 to
> http://mysite/article/3/
> my problem is to use /article act as it was /article.php
> here is mt .htacess :
>
> ForceType application/x-httpd
On Fri, Jul 31, 2009 at 5:55 PM, Phpster wrote:
> What about
>
> $sql = "SELECT DISTINCT ID, name, address FROM restaurants WHERE
> left(name, 1) between 0 and 9";
>
>
>
>
> Bastien
>
> Sent from my iPod
You need to wrap the 0 and the 9 in single quotes, or else it returns
everything.
$sql = "SEL
On Fri, Jul 31, 2009 at 4:51 PM, Miller,
Terion wrote:
> //Show all restaurants that start with $letter not
> between "A" and "Z"
>
> $other = ctype_digit($letter);
>
> foreach(range('0','9') as $other) {
>
> $sql = "SELECT DISTINCT ID, name, address
> FROMrestaurants
>
Hi
I'm trying to use clean urls in my application:
lets say convert http://mysite/article.php?id=3 to
http://mysite/article/3/
my problem is to use /article act as it was /article.php
here is mt .htacess :
ForceType application/x-httpd-php
on php code parsing string from $_SERVER['PHP_SELF']
Hi there,
I've written a counter for my blog, which keeps the count of visitors in a
file. However, when the visitors get too many, it resets to zero. Why?
Here's the piece of code:
[code]
$f = $dir . '/view_counter' .EXT;
$fp = fopen($f, "r");
$count =fgets($fp, 1024);
fclose($fp);
$fw = fopen(
On Fri, Jul 31, 2009 at 05:38:44PM -0400, 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 clients
> databases that might be on different servers that are firewalled away
> from each other
(Sorry, forgot to send this to the whole list.)
On Fri, Jul 31, 2009 at 05:24:45PM -0400, Miller, Terion wrote:
> I'm still struggling with using ranges... Can they be passed to a query
> somehow...
>
> I have this so far but it pulls nothing:
>
> //Show all with $letter not between "A"
have you tried mysqldiff?
++Tim Hinnerk Heuer++
http://www.ihostnz.com (should be .org)
Sponsors welcome to put ads under a linked to page. This is not automated
just yet. Only image, swf or preferably text or short html ads, no
animations please. Price negotiable.
2009/8/1 Matt Neimeyer
> I
I was trying to stay away from regex as much as possible due to the
overhead? I might be wrong here.
This script will be parsing a lot of requests/sec. Thousands, maybe
more, which it also needs to toss into a DB. I want to try and keep it
as fast as possible. This is tricky when you don't know wh
On Sat, 01 Aug 2009 00:22:21 +0300, Paul Halliday
wrote:
Whats the cleanest (I have a really ugly) way to break this:
[21/Jul/2009:00:00:47 -0300]
into:
date=21/jul/2009
time=00:00:47
...
Why not just use regexp ?
For example:
$string = "long text.. multiply lines...
[21/Jul/20
On Jul 31, 2009, at 5:24 PM, "Miller, Terion" > wrote:
I'm still struggling with using ranges... Can they be passed to a
query
somehow...
I have this so far but it pulls nothing:
//Show all with $letter not between "A" and "Z"
if ($
$result = mysql_query($sql) or die(mysql_error
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 clients
databases that might be on different servers that are firewalled away
from each other. Given the two structures it will list all the SQL
commands needed to mak
On Jul 31, 2009, at 5:22 PM, Paul Halliday
wrote:
Whats the cleanest (I have a really ugly) way to break this:
[21/Jul/2009:00:00:47 -0300]
into:
date=21/jul/2009
time=00:00:47
Caveats:
1) if the day is < 10 the beginning of the string will look like
"[1/...
2) the "-0300" will d
I'm still struggling with using ranges... Can they be passed to a query
somehow...
I have this so far but it pulls nothing:
//Show all with $letter not between "A" and "Z"
if ($selectedLetter = "#") {
$other = range('0','9');
$sql = "SELECT DISTINCT ID, na
Whats the cleanest (I have a really ugly) way to break this:
[21/Jul/2009:00:00:47 -0300]
into:
date=21/jul/2009
time=00:00:47
Caveats:
1) if the day is < 10 the beginning of the string will look like "[1/...
2) the "-0300" will differ depending on DST or TZ. I don't need it
though, it just ha
-snip---
So I'm almost almost there, but now when I click the # it shows me all records,
is my foreach range not right?
//Create array with letters AND number sign
$letters = range('A','Z');array_push($letters, '#');
Shawn McKenzie wrote:
> Igor Escobar wrote:
>> No no, i need to make an regex to "match" the bold areas in my string.
>> Anything between single quotes or double quotes (including quotes and
>> double quotes). Understand?
>>
>>
>> Regards,
>> Igor Escobar
>> Systems Analyst & Interface Designer
>>
Igor Escobar wrote:
> No no, i need to make an regex to "match" the bold areas in my string.
> Anything between single quotes or double quotes (including quotes and
> double quotes). Understand?
>
>
> Regards,
> Igor Escobar
> Systems Analyst & Interface Designer
>
> + http://blog.igorescobar.com
>
On 7/31/09 3:08 PM, "Bastien Koert" wrote:
On Fri, Jul 31, 2009 at 3:10 PM, Miller,
Terion wrote:
>
>
>
> On 7/31/09 2:00 PM, "Miller, Terion" wrote:
>
>
>
>
> On 7/31/09 1:56 PM, "Bastien Koert" wrote:
>
> $letters = '';
>
> Nope still gives the same error: Notice: Undefined index: letter
On Fri, Jul 31, 2009 at 3:10 PM, Miller,
Terion wrote:
>
>
>
> On 7/31/09 2:00 PM, "Miller, Terion" wrote:
>
>
>
>
> On 7/31/09 1:56 PM, "Bastien Koert" wrote:
>
> $letters = '';
>
> Nope still gives the same error: Notice: Undefined index: letter
>
> Well getting closer with this but now my out
Igor Escobar wrote:
> The solution don't need to be with regex, if anyone can solve this with
> other way will be very helpfull .
>
>
> Regards,
> Igor Escobar
> Systems Analyst & Interface Designer
>
> + http://blog.igorescobar.com
> + http://www.igorescobar.com
> + @igorescobar (twitter)
>
>
The solution don't need to be with regex, if anyone can solve this with
other way will be very helpfull .
Regards,
Igor Escobar
Systems Analyst & Interface Designer
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar (twitter)
On Fri, Jul 31, 2009 at 2:23 PM, Igor Esco
On 7/31/09 2:00 PM, "Miller, Terion" wrote:
On 7/31/09 1:56 PM, "Bastien Koert" wrote:
$letters = '';
Nope still gives the same error: Notice: Undefined index: letter
Well getting closer with this but now my output menu is not a clickable link?
On 7/31/09 1:56 PM, "Bastien Koert" wrote:
$letters = '';
Nope still gives the same error: Notice: Undefined index: letter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Jul 31, 2009 at 2:51 PM, Miller,
Terion wrote:
>
>
>
> --snip---
>
> --
> Well I almost have it with this, I keep getting an undefined index $letter
> error though and then it outputs the $menu how do I fix that
>
> //Create array with letters AND number sign
> $
--snip---
--
Well I almost have it with this, I keep getting an undefined index $letter
error though and then it outputs the $menu how do I fix that
//Create array with letters AND number sign $letters
= range('A','Z'); array_push($letters,
Miller, Terion wrote:
>
>
> On 7/31/09 12:43 PM, "Bastien Koert" wrote:
>
> On Fri, Jul 31, 2009 at 1:40 PM, Miller,
> Terion wrote:
>>
>>
>> On 7/31/09 12:27 PM, "Bastien Koert" wrote:
>>
>> $letter = isset($_GET['letter']) ? $_GET['letter'] :"";
>>
>> echo '';
>>
>> foreach(range('A','Z')
On 7/31/09 12:43 PM, "Bastien Koert" wrote:
On Fri, Jul 31, 2009 at 1:40 PM, Miller,
Terion wrote:
>
>
>
> On 7/31/09 12:27 PM, "Bastien Koert" wrote:
>
> $letter = isset($_GET['letter']) ? $_GET['letter'] :"";
>
> echo '';
>
> foreach(range('A','Z') as $c){
> ($letter == $c) ? printf('%s
On Fri, Jul 31, 2009 at 1:40 PM, Miller,
Terion wrote:
>
>
>
> On 7/31/09 12:27 PM, "Bastien Koert" wrote:
>
> $letter = isset($_GET['letter']) ? $_GET['letter'] :"";
>
> echo '';
>
> foreach(range('A','Z') as $c){
> ($letter == $c) ? printf('%s ',$c) : printf(' href="browse.php?letter=%s">%s
On 7/31/09 12:27 PM, "Bastien Koert" wrote:
$letter = isset($_GET['letter']) ? $_GET['letter'] :"";
echo '';
foreach(range('A','Z') as $c){
($letter == $c) ? printf('%s ',$c) : printf('%s ',$c,$c);
}
echo '';
//Other
$bNumberShown = false;
foreach(range('0','9') as $n){
if($le
On Fri, Jul 31, 2009 at 12:53 PM, Miller,
Terion wrote:
>
>
>
>
> I have this script that works, just a couple tweeks needed...
>
> 1. I don't want it to default to A being selected
> 2. I need the number range part to only display one # sign not 10 of them,
> somehow I have to have it pull any rec
Hi Folks,
I have a serious problem.
must create a regular expression against all that is between single quote or
double quotes. Easy? Ok, i know, but i need that "everything" must to be too
an single quote or double quote.
If i have this SQL command:
SELECT * FROM TSTRENIC.MEI_ACESSO WHERE UPPER
Hi Guys / Girls,
We are transitioning our framework to use the namespaces which are
available in php 5.3.
I found an explanation of the resolution rules here :
http://www.sitepoint.com/blogs/2009/07/14/php-namespaces-import-alias-resolution/
( also listed below)
and I was wondering what the perfo
I have this script that works, just a couple tweeks needed...
1. I don't want it to default to A being selected
2. I need the number range part to only display one # sign not 10 of them,
somehow I have to have it pull any record that does not start with alpha
';
fo
Miller, Terion wrote:
>
>
> On 7/31/09 11:03 AM, "Miller, Terion" wrote:
>
>
>
>
> On 7/31/09 10:54 AM, "Jim Lucas" wrote:
>
> Miller, Terion wrote:
>>
>> On 7/31/09 10:14 AM, "Bastien Koert" wrote:
>>
>> On Fri, Jul 31, 2009 at 10:59 AM, Miller,
>> Terion wrote:
>>>
>>> On 7/31/09 9:53 A
On 7/31/09 10:54 AM, "Jim Lucas" wrote:
Miller, Terion wrote:
>
>
> On 7/31/09 10:14 AM, "Bastien Koert" wrote:
>
> On Fri, Jul 31, 2009 at 10:59 AM, Miller,
> Terion wrote:
>>
>>
>> On 7/31/09 9:53 AM, "Bastien Koert" wrote:
>>
>> On Fri, Jul 31, 2009 at 10:28 AM, Miller,
>> Terion wrote:
>
On 7/31/09 11:03 AM, "Miller, Terion" wrote:
On 7/31/09 10:54 AM, "Jim Lucas" wrote:
Miller, Terion wrote:
>
>
> On 7/31/09 10:14 AM, "Bastien Koert" wrote:
>
> On Fri, Jul 31, 2009 at 10:59 AM, Miller,
> Terion wrote:
>>
>>
>> On 7/31/09 9:53 AM, "Bastien Koert" wrote:
>>
>> On Fri, Ju
On 7/31/09 10:54 AM, "Jim Lucas" wrote:
Miller, Terion wrote:
>
>
> On 7/31/09 10:14 AM, "Bastien Koert" wrote:
>
> On Fri, Jul 31, 2009 at 10:59 AM, Miller,
> Terion wrote:
>>
>>
>> On 7/31/09 9:53 AM, "Bastien Koert" wrote:
>>
>> On Fri, Jul 31, 2009 at 10:28 AM, Miller,
>> Terion wrote:
>
Miller, Terion wrote:
>
>
> On 7/31/09 10:14 AM, "Bastien Koert" wrote:
>
> On Fri, Jul 31, 2009 at 10:59 AM, Miller,
> Terion wrote:
>>
>>
>> On 7/31/09 9:53 AM, "Bastien Koert" wrote:
>>
>> On Fri, Jul 31, 2009 at 10:28 AM, Miller,
>> Terion wrote:
>>>
>>>
>>> On 7/31/09 8:58 AM, "m0s" wrot
I like it... Thanks!
On Thu, Jul 30, 2009 at 8:04 PM, Ben Dunlap wrote:
>> I don't THINK I need to worry about circular mappings... but I'm not
>> sure how to check for it if I did...
> Would the following work? It avoids recursion entirely and also checks for
> circular mappings. You can plug in
On 7/31/09 10:14 AM, "Bastien Koert" wrote:
On Fri, Jul 31, 2009 at 10:59 AM, Miller,
Terion wrote:
>
>
>
> On 7/31/09 9:53 AM, "Bastien Koert" wrote:
>
> On Fri, Jul 31, 2009 at 10:28 AM, Miller,
> Terion wrote:
>>
>>
>>
>> On 7/31/09 8:58 AM, "m0s" wrote:
>>
>> (!empty($row['notes']) && Is
Looks like what I did by using mm/dd/ was extra, which was probably why it
didn't work.
Thanks, looks like this is up and running now.
Alice
> CC: php-general@lists.php.net
> From: stu...@stuconnolly.com
> To: aj...@alumni.iu.edu
> Subject: Re: [PHP] String to Date Conversion Problem
>
> On 7/31/09 9:53 AM, "Bastien Koert" wrote:
>
> On Fri, Jul 31, 2009 at 10:28 AM, Miller,
> Terion wrote:
> >
> >
> >
> > On 7/31/09 8:58 AM, "m0s" wrote:
> >
> > (!empty($row['notes']) && IsAlpha($row['notes']))
> >
> > I tried that and this one:
> >
> > If (!empty($row['notes']) && ctype_alph
On Fri, Jul 31, 2009 at 10:59 AM, Miller,
Terion wrote:
>
>
>
> On 7/31/09 9:53 AM, "Bastien Koert" wrote:
>
> On Fri, Jul 31, 2009 at 10:28 AM, Miller,
> Terion wrote:
>>
>>
>>
>> On 7/31/09 8:58 AM, "m0s" wrote:
>>
>> (!empty($row['notes']) && IsAlpha($row['notes']))
>>
>> I tried that and this
Trying to unsubscribe from the list, send the email and get this response:
'Acknowledgment: The address
tinmach...@googlemail.com
was not on the php-general mailing list when I received your request and is
not a subscriber of this list.'
Where I'm sure that is the address I'm subscribed
On 7/31/09 9:53 AM, "Bastien Koert" wrote:
On Fri, Jul 31, 2009 at 10:28 AM, Miller,
Terion wrote:
>
>
>
> On 7/31/09 8:58 AM, "m0s" wrote:
>
> (!empty($row['notes']) && IsAlpha($row['notes']))
>
> I tried that and this one:
>
> If (!empty($row['notes']) && ctype_alpha($row['notes']))
>
> It
On Fri, Jul 31, 2009 at 10:28 AM, Miller,
Terion wrote:
>
>
>
> On 7/31/09 8:58 AM, "m0s" wrote:
>
> (!empty($row['notes']) && IsAlpha($row['notes']))
>
> I tried that and this one:
>
> If (!empty($row['notes']) && ctype_alpha($row['notes']))
>
> It didn't display the notes at all...
>
> And this
Hi Alice,
Based on the string format that you mentioned (DD MMM YY - DAY) you
should be able to transform to any other date using the following:
$parts = explode(' ', '23 JUL 09 - THURSDAY');
echo date('m/d/Y', strtotime("{$parts[1]} {$parts[0]} {$parts[2]}"));
Cheers
Stuart
On 31 Jul 200
On 7/31/09 8:58 AM, "m0s" wrote:
(!empty($row['notes']) && IsAlpha($row['notes']))
I tried that and this one:
If (!empty($row['notes']) && ctype_alpha($row['notes']))
It didn't display the notes at all...
And this one...doesn't display if the field has a 0 in it but I still need it
to?
I
On Fri, 31 Jul 2009 07:54:13 -0400, Dan Shirah wrote:
>>
>> How does that work considering that mysql_query() only
>> returns true or false on INSERT? I'd expect the script
>> to fail on $result not being a valid resource.
>>
>
> I don't know about mysql as I work with MSSQL Server and Informix,
Hi, Guys:
I am trying to turn a prepared line into a date format, and the string looks
something like this: 23 JUL 09 - THURSDAY, and I am trying to change the
string to a mm/dd/ format that looks like 07/23/2009.
I tried to use strtotime() but it gave me nothing.
Here is the cod
Miller, Terion wrote:
> I need this to say : If row notes is not empty and is alpha echo notes
>
> How do I get the is alpha part in here;
>
> If (!empty($row['notes'])) {
>
>
> echo(" $trimNotes ");
>
> }
>
> I tried.
>
> If (IsAlpha($row['notes'])) {
>
>
> echo(" $trimNotes ");
On Fri, 2009-07-31 at 06:53 -0700, Miller, Terion wrote:
> I need this to say : If row notes is not empty and is alpha echo notes
>
> How do I get the is alpha part in here;
>
> If (!empty($row['notes'])) {
>
>
> echo(" $trimNotes ");
>
> }
>
> I tried.
>
> If (IsAlpha($row['note
On Fri, 2009-07-31 at 11:27 +0100, David Otton wrote:
> 2009/7/31 Paul Scott :
>
> -1. Measure everything. No point implementing a change that slows
> things down. Implement low-hanging-fruit first (eg a CDN)
> 0. Optimise your existing setup before adding more layers
> > 1. Cache as much as you c
I need this to say : If row notes is not empty and is alpha echo notes
How do I get the is alpha part in here;
If (!empty($row['notes'])) {
echo(" $trimNotes ");
}
I tried.
If (IsAlpha($row['notes'])) {
echo(" $trimNotes ");
}
But it broke the whole script.
--Terion
>
> How does that work considering that mysql_query() only
> returns true or false on INSERT? I'd expect the script
> to fail on $result not being a valid resource.
>
I don't know about mysql as I work with MSSQL Server and Informix, but for
me it works like this:
$insert = ifx_prepare("INSERT
> -Original Message-
> From: b [mailto:p...@logi.ca]
> Sent: 30 July 2009 03:17
>
>
> >
> >>> echo (preg_match($pattern, $test) != false)
> >
> > The " != false " here is redundant.
>
> Understood. But what you think is redundancy is, to me, clarity in
> programming. I happen to think th
On Thu, 30 Jul 2009 10:42:26 -0400, Dan Shirah wrote:
> I don't know what version of SQL you are using, but I have found that using:
>
> mysql_free_result($result);
> mssql_free_result($result);
> ifx_free_result($result);
>
> Helped my queries run much faster and use less resources. I had somet
2009/7/31 Paul Scott :
-1. Measure everything. No point implementing a change that slows
things down. Implement low-hanging-fruit first (eg a CDN)
0. Optimise your existing setup before adding more layers
> 1. Cache as much as you can (everything)
> 2. Minimise HTTP requests
> 3. Use an opcode cac
Ashley Sheridan wrote:
> I've optimised the images in the template, enabled the GZ compression,
> and it's only improved the speed by a mere fraction. I have noticed that
> the page itself doesn't display until after this delay, so I was
> guessing that I could maybe force the buffer to flush at ke
Hi Guys,
I know this is maybe a bit specific for the general list, but thought
I'd throw it out there anyway as I reckon a lot of you have had
experience with PHPBB at some point or another. We've got an existing
installation of the forum here, that's been active for a couple of years
and is fairl
Aschwin Wesselius wrote:
Angelo Zanetti wrote:
Hi all,
I have the following segment of XML:
165432
Now I want to get the value of the BookingReference where the
ReferenceSource = "api". In other words I want to get the value 165432.
I have the following code:
$ItemConfirmationReference2 = $x
Angelo Zanetti wrote:
Hi all,
I have the following segment of XML:
165432
Now I want to get the value of the BookingReference where the
ReferenceSource = "api". In other words I want to get the value 165432.
I have the following code:
$ItemConfirmationReference2 = $xpath->query('BookingR
On Thu, 2009-07-30 at 21:26 -0400, b wrote:
> On 07/30/2009 10:15 AM, Ashley Sheridan wrote:
> > On Thu, 2009-07-30 at 07:12 -0700, Christoph Boget wrote:
> >>
> >> You could email it to me, which I presume is better if you replied
> >> back just to me and not the list?
> >>
> > Just copying the l
Hi,
> I have many products per page and this code pulls the list price and
> formats it. It works fine, but I'd like to know if I can shorten it.
Personally, I would advise against trying to cram as much as possible
into the least amount of space as possible, and instead going for
verbosi
I'm sorry for this post. It's only testing. Thanks for understand.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Just testing message
Miller, Terion napsal(a):
> Yep I forgot about escaping the $
>
>
>
> On 7/29/09 10:51 AM, "Ford, Mike" wrote:
>
>> -Original Message-
>> From: Miller, Terion [mailto:tmil...@springfi.gannett.com]
>> Sent: 29 July 2009 16:36
>>
>> Ok in my output to Quark I need t
Nathan Nobbe wrote:
> On Wed, Jul 29, 2009 at 1:18 PM, Skip Evans
> wrote:
>
>> Hey,
>>
>> I've been asked to write a simple couple of public pages that would
>> let an Asterisk customer modify their account configuration, but the
>> client has no idea how Asterisk stores its data, apparently no
Hi all,
I have the following segment of XML:
165432
Now I want to get the value of the BookingReference where the
ReferenceSource = "api". In other words I want to get the value 165432.
I have the following code:
$ItemConfirmationReference2 = $xpath->query('BookingReference
ReferenceSource'
69 matches
Mail list logo