Re: [PHP] Re: File or directory?

2009-08-18 Thread Ollisso
On Tue, 18 Aug 2009 13:00:37 +0300, Clancy wrote: On Sun, 16 Aug 2009 23:24:05 -0600, george.lang...@shaw.ca (George Langley) wrote: is_dir() is_file() I specifically asked about FTP under PHP. As far as I

[PHP] Re: Issue with the huge import script

2009-08-16 Thread Ollisso
On Sun, 16 Aug 2009 04:15:12 +0300, Devendra Jadhav wrote: Is it because of the size of the records or something else...? Please suggest me some solution which is faster, safe and easy to code :D What about using insert ignore ? :) 1. add UNIQUE constraint on a key you want to add, so yo

[PHP] Re: Class Problems

2009-08-11 Thread Ollisso
On Tue, 11 Aug 2009 18:35:35 +0300, Ashley Sheridan wrote: Hey all, Is there any reason why this shouldn't work correctly on a server running PHP 4.4.7: I would at the very least expect to see the 'wtf' printed out. I've got a whole class I've written that works fine in PHP 5, but on PHP

[PHP] Re: Synchronizing autonumber fields

2009-08-11 Thread Ollisso
On Tue, 11 Aug 2009 10:04:52 +0300, "Leidago !Noabeb" wrote: Hi I have the following tables setup in MYSQL: Region 1 Region 2 HQ Tbl1 with autonumbered (PK) Tbl1 with autonumbered (PK) Tbl1 autonumbered-PK To explain t

[PHP] Re: MySQL auto_increment fields Server version: 5.1.32-community-log

2009-08-10 Thread Ollisso
On Sun, 09 Aug 2009 21:17:15 +0300, "Ralph Deffke" wrote: Hi all, I'm facing the fact that it seems that auto_increment fields in a table not start at 1 like it was in earlier versions even if I install mySQL brand new creating all tables new. it seems to me that auto_increments handlin

[PHP] Re: Buffered Logging?

2009-08-07 Thread Ollisso
On Sat, 08 Aug 2009 01:46:38 +0300, Waynn Lue wrote: Hey PHPers, We've been doing sampled logging to the database in our application for awhile, and now I'm hoping eventually to blow that out to a larger scale. I'm worried about the performance implications of logging to our database on ...

[PHP] Re: Time keeping in DB

2009-08-05 Thread Ollisso
On Wed, 05 Aug 2009 22:18:31 +0300, Shawn McKenzie wrote: So, obviously not PHP related, but I'm looking for thoughts on the best way to record time sheets in a DB. A time sheet for hours worked per day, not like a time clock where you start and stop. The two possibilities that I have thoug

Re: [PHP] navigation include not functioning

2009-08-05 Thread ollisso
On Wed, 05 Aug 2009 20:19:00 +0300, Allen McCabe wrote: Sure. When I load my site, default.php loads ( displaying: http://uplinkdesign.hostzi.com/ in the browser as expected). $thisPage is set to "about" via: in the tags. I am seeing this: The first 2 includes work just fine, loading

Re: [PHP] Re: What makes _SERVER stop working

2009-08-03 Thread Ollisso
On Mon, 03 Aug 2009 21:48:08 +0300, "Miller, Terion" wrote: Thanks but it still doesn't work, it defaults to 'A' and I want it to default to show 'A" only on browse.php all other pages should show NO default selections. ' Create file with this content: and run it with browser. an

[PHP] Re: What makes _SERVER stop working

2009-08-03 Thread Ollisso
On Mon, 03 Aug 2009 20:26:35 +0300, "Miller, Terion" wrote: All of a sudden this stopped working and keeps defaulting to A again if ($_SERVER['SCRIPT_FILENAME'] = "browse.php" ) { $default = "A"; } else { $default = ""; } it should be: if ($_SERVER['SCRIPT_FILENAME'] == "browse.ph

[PHP] Re: PHP programming strategy

2009-08-03 Thread Ollisso
On Sun, 02 Aug 2009 04:25:40 +0300, Clancy wrote: Is anyone here interested in discussing programming strategy, or or know of a discussion group which is interested in the subject? The sorts of questions I am interested in are: 1. I have a highly variable program which always shows the same

Re: [PHP] isset not functioning

2009-08-03 Thread Ollisso
On Mon, 03 Aug 2009 20:11:44 +0300, "Parham Doustdar" wrote: Your if-statement should be like this: [code] if(isset($_REQUEST['firstname']) && !empty($_REQUEST['firstname'])) { ... } [/code] Or even: [code] if(!empty($_REQUEST['firstname'])) { ... } [/code] Because empty will also check

[PHP] Re: Problem: Writing into Files?

2009-08-03 Thread Ollisso
On Sun, 02 Aug 2009 13:14:42 +0300, "Parham Doustdar" wrote: Now this one always sets the file to one for some reason. I'll reiterate just in case there's been a misunderstanding on my part: [code] $fp = fopen($f, "r+"); while (!flock($fp, LOCK_EX)) sleep(1); $count = fgets($fp,filesize($fp));

Re: [PHP] Radio buttons problem

2009-08-03 Thread Ollisso
On Mon, 03 Aug 2009 11:01:13 +0300, leledumbo wrote: How can I make a radio button in one entry to behave independently from the one in another so that it can be accessed as name and email above? This should work: -- -- PHP General Mailing List (http://www.php.net/) To unsubsc

[PHP] Re: Problem: Writing into Files?

2009-08-02 Thread Ollisso
On Sun, 02 Aug 2009 07:11:27 +0300, "Parham Doustdar" wrote: Dear Ollisso, I tried it with FLock() but it still didn't work. This is what I did: [code] $fp = fopen($f, "r"); $count =fgets($fp, 1024); fclose($fp); $fw = fopen($f, "w"); while (!flock($fw, LOC

Re: [PHP] Re: Clean break.

2009-08-01 Thread ollisso
This is tricky when you don't know what you are doing :). My coding is limited to hammering away at the search box on php.net until I get a push in the right direction. It's just a hack from there. Using phpster's substr suggestion has already sped this up considerably. 2009/

[PHP] Re: Problem: Writing into Files?

2009-08-01 Thread Ollisso
On Sat, 01 Aug 2009 08:20:23 +0300, "Parham Doustdar" wrote: 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

[PHP] Re: Clean break.

2009-07-31 Thread Ollisso
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