Re: [PHP] php5 oop question

2007-04-11 Thread Jim Lucas
Paul Scott wrote: On Wed, 2007-04-11 at 23:22 -0700, Jim Lucas wrote: Has anybody else seen this style of syntax? http://5ive.uwc.ac.za/index.php?module=blog&action=viewsingle&postid=init_8059_1163957717&userid=5729061010 I don't think that its really useful for anything, except maybe creati

Re: [PHP] php5 oop question

2007-04-11 Thread Jim Lucas
Paul Scott wrote: On Wed, 2007-04-11 at 23:22 -0700, Jim Lucas wrote: Has anybody else seen this style of syntax? http://5ive.uwc.ac.za/index.php?module=blog&action=viewsingle&postid=init_8059_1163957717&userid=5729061010 I don't think that its really useful for anything, except maybe creati

Re: [PHP] location of the PHP executable

2007-04-11 Thread Chris
Børge Holen wrote: On Wednesday 11 April 2007 23:50, Jarrel Cobb wrote: Don't you have to run locate -u first to generate the database before using locate? You can't just assume a database exists already can you? not an updated one at least, updatedb can also be used to update. Probably can

Re: [PHP] php5 oop question

2007-04-11 Thread Paul Scott
On Wed, 2007-04-11 at 23:22 -0700, Jim Lucas wrote: > Has anybody else seen this style of syntax? > http://5ive.uwc.ac.za/index.php?module=blog&action=viewsingle&postid=init_8059_1163957717&userid=5729061010 I don't think that its really useful for anything, except maybe creating overly complex

Re: [PHP] location of the PHP executable

2007-04-11 Thread Børge Holen
On Wednesday 11 April 2007 23:50, Jarrel Cobb wrote: > Don't you have to run locate -u first to generate the database before using > locate? You can't just assume a database exists already can you? not an updated one at least, updatedb can also be used to update. and if you're in a little bit of

[PHP] php5 oop question

2007-04-11 Thread Jim Lucas
Ok, I have seen many different examples of OOP, but nothing quite like this. Someone was showing me syntax for Ruby the other day, and it got me thinking, wouldn't it be neat to imitate ruby, or be it a little more generic, dot notation for OOP ways of calling methods like Java, javascript, rub

Re: [PHP] 'lang' file editor ...

2007-04-11 Thread Jim Lucas
Richard Lynch wrote: Seems to me you'd be better off just running the PHP code and dumping the arrays out with var_dump or print_r "like" function to generate your new language files... Otherwise, you're writing a fairly big chunk of the PHP parser, which is already in PHP, so you re-invent the

Re: [PHP] Constructors with multiple methods

2007-04-11 Thread Chris
Damien wrote: Hi all, Say you may want to create an instance in multiple ways, such as creating from scratch or loading from a database. Is something like this normal for creating an instance? I do this: class Foo { function Foo($id=0) { if (is_int($id) && (int)$id > 0) { return

Re: [PHP] Constructors with multiple methods

2007-04-11 Thread Jarrel Cobb
"creating from scratch or loading from a database" sounds like you want a registry or service locator. Otherwise, you should encapsulate object instantiation in factory methods/classes On 4/11/07, Damien <[EMAIL PROTECTED]> wrote: Hi all, Say you may want to create an instance in multiple way

[PHP] Constructors with multiple methods

2007-04-11 Thread Damien
Hi all, Say you may want to create an instance in multiple ways, such as creating from scratch or loading from a database. Is something like this normal for creating an instance? class Foo { function Foo($method) { switch ($method) { default: $method = 'create'; case '

Re: [PHP] PHP textbook suggestions?

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 2:09 pm, Chris Lott wrote: > On 4/10/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> > print 'The cost is ' . $cost; >> > NOT >> > print "The cost is $cost"; >> > AND CERTAINLY NOT >> > print ("The cost is $cost"); >> >> echo "The cost is ", $cost; >> >> If you're going to be

Re: [PHP] Re: PHP textbook suggestions?

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 5:12 pm, LuKreme wrote: > On 11-Apr-2007, at 13:06, Chris Lott wrote: >> I completely recognize that the practical effects of the differences >> are small, but the learning effects of the inconsistencies is much >> larger, particularly with a group of students that are not te

Re: [PHP] PHP textbook suggestions?

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 22:47 -0500, Richard Lynch wrote: > On Tue, April 10, 2007 9:40 pm, Robert Cummings wrote: > >> echo "The cost is ", $cost; > > > > -1 Improper use of double quotes when nothing interpolated. > > Yeah, I used to believe in that Urban Legend, and even promulgated it, > once up

Re: [PHP] Re: PHP textbook suggestions?

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 2:06 pm, Chris Lott wrote: > You're missing the point-- it's not that there is a practical > difference in the examples, it's that there IS a difference, the > students see it, and it is an extra point of confusion that isn't > needed if one is being consistent. > > I complet

Re: [PHP] PHP textbook suggestions?

2007-04-11 Thread Richard Lynch
On Tue, April 10, 2007 9:40 pm, Robert Cummings wrote: >> echo "The cost is ", $cost; > > -1 Improper use of double quotes when nothing interpolated. Yeah, I used to believe in that Urban Legend, and even promulgated it, once upon a time. Then Rasmus set me straight that it's not really any faste

[PHP] Re: SQL Source Control

2007-04-11 Thread Manuel Lemos
Hello, on 04/11/2007 12:13 PM Richard Davey said the following: > Hi all, > > I know a lot of you use various means for PHP source control (CVS, SVN, > etc), which is all well and fine, but how do you manage source control > on your databases? > > Say you've got an upgrade to a site, all of the

Re: [PHP] Re: 0x9f54

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 6:47 am, Man-wai Chang wrote: > how do you do string comparison in utf-8? say the user entered a > chinese > string the browser and you need to search for the string in the MySQL > table using PHP. *IF* the page that got the initial data was UTF-8 in its HTTP Headers and in

Re: [PHP] MD5 & bot Question

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 8:09 am, tedd wrote: > -- that's all. See the subject line. I'm sorry that I thought the thread had spilled over beyond the scope of the Subject. Since we rarely do that here in PHP General, I should have known better. :-) I don't think your work is "lame" I think it's "

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 22:10 -0500, Richard Lynch wrote: > On Wed, April 11, 2007 9:58 pm, Robert Cummings wrote: > > I see it as two different things being matched up in a clear > unequivocal manner, to make self-documenting code. I'm all for self-documenting code, that's why I don't in practice e

Re: [PHP] MD5 & bot Question

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 7:30 am, tedd wrote: > At 7:50 PM -0500 4/10/07, Richard Lynch wrote: >>On Sun, April 8, 2007 11:12 am, tedd wrote: >>> chose from. Unless, there is something here that I don't >>> understand >>> (which very well could be), I can't see how anyone, without >>> massive >>> c

Re: [PHP] Array remove function?

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 9:00 pm, Jochem Maas wrote: > [PS - I've the pleasure of listening to a colleague do a manual > install > of Vista over an existing copy of XP and then get the really tricky > stuff > like the soundcard to work ... for the last week :-/] Give them an Ubuntu (or similar) CD a

Re: [PHP] 'lang' file editor ...

2007-04-11 Thread Richard Lynch
Seems to me you'd be better off just running the PHP code and dumping the arrays out with var_dump or print_r "like" function to generate your new language files... Otherwise, you're writing a fairly big chunk of the PHP parser, which is already in PHP, so you re-invent the wheel... On Wed, April

Re: [PHP] Posting a variable

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 9:58 pm, Robert Cummings wrote: > The table fields should have been named well enough in the first > place. Some are not fields at all, but calculations, and, yes, I'll have an " AS foo" in my SQL (only not really foo, of course) simply for documentation purposes, even thoug

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 21:30 -0500, Richard Lynch wrote: > On Wed, April 11, 2007 8:17 pm, Robert Cummings wrote: > > I'd rather lose track of $row['foozie'] than $row[1]. Either way, if > > your code is structured well, the row data should be in close > > proximity > > to it's use. At the very leas

Re: [PHP] Re: downloading an image

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 9:37 am, Ross wrote: > yes it is image/jpeg Some (ancient) versions of IE don't give a doodly-squat what your Content-type header is. They'll "guess" based on the URL. Your URL is like this: download.php?id=47 IE thinks that's a .php file, and has no idea how to handle a

Re: [PHP] downloading an image

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 8:10 am, Ross wrote: > tthe image does not display although it exists in the table 'images' > > > This calls the download script > > > $property_id = $_SESSION['property_id'] ; > $query = "SELECT * FROM images WHERE property_id='$property_id'"; > $result = mysql_query($que

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 7:59 pm, Jarrel Cobb wrote: > There is a code view in Dreamweaver. The split view is useful for > making > handcoded changes to HTML in the top code view and seeing the > immediate > result in the bottom design view. You dont have to use the WYSIWYG > features. If I'm onl

Re: [PHP] Posting a variable

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 8:17 pm, Robert Cummings wrote: > I'd rather lose track of $row['foozie'] than $row[1]. Either way, if > your code is structured well, the row data should be in close > proximity > to it's use. At the very least, if your field names are informative > instead of 'foozie', mayb

Re: [PHP] Outlook task via email

2007-04-11 Thread Chris
Chris Boget wrote: I've done some searching on Google but haven't been able to come up with anything helpful. Has anyone on the list done any work on sending an Outlook Task as part of an email? Or does anyone know of a good resource that shows how this can be done? I'm going to be using PHP

Re: [PHP] Array remove function?

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 8:44 am, Tijnema ! wrote: > On 4/10/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> http://php.net/array_flip followed up an unset, followed by another >> array_flip, I guess... > > What if you have an array like this: > Array > ( > [0] => Array > ( >

[PHP] 'lang' file editor ...

2007-04-11 Thread Jochem Maas
anyone know of a decent script (or something I can rip out of an existing OS tool) that is capable of comparing, editing and saving 'old skool' lang files - you know the ones which define tons of array elements e.g.: $Lang['foo'] = 'bar'; I'm looking for something that can handle quotes properl

Re: [PHP] Array remove function?

2007-04-11 Thread Jochem Maas
Paul Novitski wrote: > At 4/10/2007 03:09 PM, M.Sokolewicz wrote: >> Such a function is inherently a Bad Idea (tm). array-values are not >> unique. Array keys are. So unless you want to emulate the way >> array_flip works (bad idea (tm)), I'd say: leave it be. > > > Whoever owns that trademark ha

Re: [PHP] SQL Source Control

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 10:13 am, Richard Davey wrote: > I know a lot of you use various means for PHP source control (CVS, > SVN, > etc), which is all well and fine, but how do you manage source control > on your databases? > > Say you've got an upgrade to a site, all of the new PHP files are > con

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Jarrel Cobb
agreed, Dreamweaver is not the tool for you. But I've found it to be useful for whipping up quick HTML newsletters from slice photoshop layouts. And I like to see incremental change so if I used the browser refresh technique trying to tweak the crappy table layouts photoshop spits out, I'd be pr

Re: [PHP] location of the PHP executable

2007-04-11 Thread Jochem Maas
your script should try it's best to find the executable, on failure you might consider having it mail an error to you so at least you can pre-empt the client with regard to getting things working. most windows machines will probably have there php binary at: $_ENV['PHPRC'].'php.exe' vari

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Robert Cummings
On Thu, 2007-04-12 at 03:24 +0200, Jochem Maas wrote: > Robert Cummings wrote: > > On Wed, 2007-04-11 at 21:14 -0400, Jarrel Cobb wrote: > >> You have to save the HTML file to see the changes with a browser refresh. > >> You can use the design view to make sure you are atleast in the ballpark > >>

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Jochem Maas
Robert Cummings wrote: > On Wed, 2007-04-11 at 21:14 -0400, Jarrel Cobb wrote: >> You have to save the HTML file to see the changes with a browser refresh. >> You can use the design view to make sure you are atleast in the ballpark >> before saving and using the IE/Firefox preview. I know most peo

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Jochem Maas
Jarrel Cobb wrote: > There is a code view in Dreamweaver. The split view is useful for making > handcoded changes to HTML in the top code view and seeing the immediate > result in the bottom design view. You dont have to use the WYSIWYG > features. > ye I'm glad to say my position

Re: [PHP] dynamic web interface and size

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 10:57 am, Robert Cummings wrote: > On Wed, 2007-04-11 at 17:44 +0200, Tijnema ! wrote: >> On 4/11/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> > >> > >> > 1000 pixels? >> > >> > Woof. >> > >> > Guess my 800x600 box is not in your market... >> >> 800x600 :| >> >> Using 1600

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 21:14 -0400, Jarrel Cobb wrote: > You have to save the HTML file to see the changes with a browser refresh. > You can use the design view to make sure you are atleast in the ballpark > before saving and using the IE/Firefox preview. I know most people go with > CSS layout now

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 20:12 -0500, Richard Lynch wrote: > On Wed, April 11, 2007 12:53 pm, [EMAIL PROTECTED] wrote: > > Quoting Robert Cummings <[EMAIL PROTECTED]>: > > > >> On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: > >> > 1- your mysql query statement is better to have a WHERE pa

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Jarrel Cobb
You have to save the HTML file to see the changes with a browser refresh. You can use the design view to make sure you are atleast in the ballpark before saving and using the IE/Firefox preview. I know most people go with CSS layout now a days, but this was insanely useful for complicated table l

Re: [PHP] Posting a variable

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 12:53 pm, [EMAIL PROTECTED] wrote: > Quoting Robert Cummings <[EMAIL PROTECTED]>: > >> On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: >> > 1- your mysql query statement is better to have a WHERE part too. >> > 2- I would use mysql_fetch_row instead of mysql_fetch

Re: [PHP] Posting a variable

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 11:21 am, Zhimmy Kanata wrote: > echo "$username"; > echo "$username02"; Copy/paste these two lines *EVERYWHERE* in your script that you can find: $username = or $username02 = -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie

Re: [PHP] Re: Design Dilemma - Database Data Abstraction

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 3:40 pm, Roman Neuhauser wrote: > What's easy for an idiot to use is often a weak tool if you need to > get > a bit more serious, cf the problems with composite keys you described. > Sure, Lego duplo is so idiot proof that a year old can bang two pieces > each against the oth

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 20:59 -0400, Jarrel Cobb wrote: > There is a code view in Dreamweaver. The split view is useful for > making handcoded changes to HTML in the top code view and seeing the > immediate result in the bottom design view. You dont have to use the > WYSIWYG features. I see chan

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Jarrel Cobb
There is a code view in Dreamweaver. The split view is useful for making handcoded changes to HTML in the top code view and seeing the immediate result in the bottom design view. You dont have to use the WYSIWYG features. On 4/11/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Wed, April 11,

Re: [PHP] location of the PHP executable

2007-04-11 Thread Mattias Thorslund
Jochem Maas wrote: > > have you tried looking for this info you want? > > > Yup, but the manual seems kind of "light" on the subject. > > I can't say for sure if it always exists but on the few boxes > > I tried I found and entry in both $_SERVER and $_ENV: > > > > "_" => '/usr/bin/php' >

Re: [PHP] location of the PHP executable

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 2:49 pm, Mattias Thorslund wrote: > 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 because it > needs > to run a second PHP script.

Re: [PHP] Re: PHP Directory List Script Files over 2 GB

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 3:36 pm, Robert M wrote: > Does anyone else have any other ideas how to resolve this, I have > tried > multiple different methods all failed. > > Does the 2 GB limitation using filesize have an alternate method of > producing the output. ? > > Thank you Logan for trying. The

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 6:00 pm, Jochem Maas wrote: > Robert Cummings wrote: >> On Wed, 2007-04-11 at 18:53 -0400, Robert Cummings wrote: >>> On Wed, 2007-04-11 at 17:43 -0400, Arbitrio, Pat wrote: Other skills: * Dreamweaver >>> *ROFLMFAO* >> >> Still *ROFLMFAO* > > I don't see what'

Re: [PHP] mysql if empty

2007-04-11 Thread Jim Lucas
tedd wrote: At 5:53 PM -0700 4/10/07, Jim Lucas wrote: Anyways, here is the expanded version hopefully to your liking. # Your request failed. Make up your own custom way of displaying the error. } else { if ( mysql_num_rows($results) > 0 ) { while ( $row = mysql_fetch_assoc(

Re: [PHP] Bind IP with fsockopen

2007-04-11 Thread chris
Hi ive tried \r\n\n and pretty much every other combination I can think of. But I still cant get it to return a line break. Otherwise the script is working though. - Original Message - From: "Richard Lynch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 11, 2007 1

Re: [PHP] Help with table in database and login scripts.

2007-04-11 Thread Chris
Karl James wrote: Team, I want to know if my table is setup correctly. I am creating a site where team owners control fantasy football teams. Imaginary teams. They can trade players, add and drop them as long as they are under the salary cap at all times. if not they are given a warning to

Re: [PHP] SQL Source Control

2007-04-11 Thread Chris
I'm surprised (or rather, I'm unaware of) there is no native MySQL solution for this situation. Considering it's not a mysql specific problem I'd be surprised if there was. Postgres lets you do database changes inside a transaction, eg: begin; alter table x add column y int; ... commit; but

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread JM Guillermin
- Original Message - From: "Robert Cummings" <[EMAIL PROTECTED]> To: "Jay Blanchard" <[EMAIL PROTECTED]> Cc: "Jochem Maas" <[EMAIL PROTECTED]>; Sent: Thursday, April 12, 2007 1:05 AM Subject: RE: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer! On Wed, 2007-04-11 at 18:03 -05

RE: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 18:03 -0500, Jay Blanchard wrote: > [snip] > Robert Cummings wrote: > > On Wed, 2007-04-11 at 18:53 -0400, Robert Cummings wrote: > >> On Wed, 2007-04-11 at 17:43 -0400, Arbitrio, Pat wrote: > >>> Other skills: > >>> > >>> * Dreamweaver > >> *ROFLMFAO* > > > > Still *ROFLMF

RE: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Jay Blanchard
[snip] Robert Cummings wrote: > On Wed, 2007-04-11 at 18:53 -0400, Robert Cummings wrote: >> On Wed, 2007-04-11 at 17:43 -0400, Arbitrio, Pat wrote: >>> Other skills: >>> >>> * Dreamweaver >> *ROFLMFAO* > > Still *ROFLMFAO* I don't see what's so funny. there is great skill involved with becomin

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Jochem Maas
Robert Cummings wrote: > On Wed, 2007-04-11 at 18:53 -0400, Robert Cummings wrote: >> On Wed, 2007-04-11 at 17:43 -0400, Arbitrio, Pat wrote: >>> Other skills: >>> >>> * Dreamweaver >> *ROFLMFAO* > > Still *ROFLMFAO* I don't see what's so funny. there is great skill involved with becoming profi

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 18:53 -0400, Robert Cummings wrote: > On Wed, 2007-04-11 at 17:43 -0400, Arbitrio, Pat wrote: > > > > Other skills: > > > > * Dreamweaver > > *ROFLMFAO* Still *ROFLMFAO* Cheers, Rob. -- .. | InterJinn Applicatio

Re: [PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 17:43 -0400, Arbitrio, Pat wrote: > > Other skills: > > * Dreamweaver *ROFLMFAO* Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :

Re: [PHP] location of the PHP executable

2007-04-11 Thread Jochem Maas
Mattias Thorslund wrote: > Jim Lucas wrote: ... > $ /my-location-of/php myscript.php > /my-location-of/php > $ > > I was hoping there's a function or $_SERVER property that would contain > this? have you tried looking for this info you want? I can't say for sure if it always exists but on the fe

RE: [PHP] location of the PHP executable

2007-04-11 Thread Buesching, Logan J
IF db not exists THEN locate -u END-IF I'd hate to see the time it'd take to create a first-time database... this could take awhile to run. -Original Message- From: Davi [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 6:10 PM To: php-general@lists.php.net S

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 because it needs >> to run a second PHP script. I

[PHP] Re: PHP textbook suggestions?

2007-04-11 Thread LuKreme
On 11-Apr-2007, at 13:06, Chris Lott wrote: You're missing the point-- it's not that there is a practical difference in the examples, it's that there IS a difference, the students see it, and it is an extra point of confusion that isn't needed if one is being consistent. I have to disagree, and

Re: [PHP] SQL Source Control

2007-04-11 Thread Travis Doherty
Richard Davey wrote: > Hi all, > > I know a lot of you use various means for PHP source control (CVS, > SVN, etc), which is all well and fine, but how do you manage source > control on your databases? > > Say you've got an upgrade to a site, all of the new PHP files are > controlled by SVN, so you

Re: [PHP] location of the PHP executable

2007-04-11 Thread Davi
Em Quarta 11 Abril 2007 18:50, Jarrel Cobb escreveu: > Don't you have to run locate -u first to generate the database before using > locate? You can't just assume a database exists already can you? > If you can use locate, you can use which... =P BTW, do something to check OS then: IF OS == *ni

Re: [PHP] PHP editor

2007-04-11 Thread Susana Carrasco
For Win, I use either Notepad++ or PHP Designer (www.mpsoftware.org). For Linux I use Joe.

Re: [PHP] location of the PHP executable

2007-04-11 Thread Jarrel Cobb
Don't you have to run locate -u first to generate the database before using locate? You can't just assume a database exists already can you? On 4/11/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Mattias Thorslund wrote: > Hi, > > I have looked in the documentation but can't find it: > > My PHP scri

[PHP] WWE in Stamford, CT needs a kick ass PHP Developer!

2007-04-11 Thread Arbitrio, Pat
You folks know anyone who fits this one? Description: Your task would be the maintenance and extension of our dynamic and cutting edge Intranet and Internet web sites written in PHP5. PHP/Mysql Experience: 3-4 years, where 1 year must be PHP5. Candidates must be well versed in: * PHP5

Re: [PHP] location of the PHP executable

2007-04-11 Thread Jim Lucas
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 because it needs to run a second PHP script. I know about the "which" command but i

[PHP] Re: PHP Directory List Script Files over 2 GB

2007-04-11 Thread Robert M
Well it looks like I am forced to use a different approach do to the limitations of PHP http://bugs.php.net/bug.php?id=27792 This Bug has been around now for HOW long now. Seems to me that it would have been addressed in the past few years, Gigabyte files have been around a long time. Maybe not

Re: [PHP] Re: PHP Directory List Script Files over 2 GB

2007-04-11 Thread Seak, Teng-Fong
Robert M wrote: Does anyone else have any other ideas how to resolve this, I have tried multiple different methods all failed. Does the 2 GB limitation using filesize have an alternate method of producing the output. ? Thank you Logan for trying. I think you'd better file a bug report to PH

Re: [PHP] mysql if empty

2007-04-11 Thread tedd
At 5:53 PM -0700 4/10/07, Jim Lucas wrote: Anyways, here is the expanded version hopefully to your liking. # Your request failed. Make up your own custom way of displaying the error. } else { if ( mysql_num_rows($results) > 0 ) { while ( $row = mysql_fetch_assoc($res

Re: [PHP] UPDATE and redirect

2007-04-11 Thread Lori Lay
Marcelo Wolfgang wrote: and what if $_GET['id'] is something like "1; DROP TABLE tb_emails;" ?? SQL injection just waits to happen Something I just thought, he could do a drop table inside an update statement ? because the query is : UPDATE tb_emails SET bol_active = $action WHERE auto_id

Re: [PHP] UPDATE and redirect

2007-04-11 Thread Marcelo Wolfgang
and what if $_GET['id'] is something like "1; DROP TABLE tb_emails;" ?? SQL injection just waits to happen Something I just thought, he could do a drop table inside an update statement ? because the query is : UPDATE tb_emails SET bol_active = $action WHERE auto_id = $id so if he changed t

[PHP] Re: SQL Source Control

2007-04-11 Thread Colin Guthrie
Zoltán Németh wrote: > yeah I have the same problem ;) > > I have two kind of SQL files: > 1) SQL of the complete, blank DB structure - I store it for each main > version (I should store it for each version if I wouldn't be so > lazy... ;) ) > 2) SQL instructions to upgrade from a DB version to an

Re: [PHP] UPDATE and redirect

2007-04-11 Thread Zoltán Németh
2007. 04. 11, szerda keltezéssel 17.36-kor Marcelo Wolfgang ezt írta: > > and what if $_GET['id'] is something like > > "1; DROP TABLE tb_emails;" > > ?? > > > > SQL injection just waits to happen > > I think tha tit will be too much of a hacker effort just to kill a table > of contact emails,

Re: [PHP] UPDATE and redirect

2007-04-11 Thread Lori Lay
Marcelo Wolfgang wrote: and what if $_GET['id'] is something like "1; DROP TABLE tb_emails;" ?? SQL injection just waits to happen I think tha tit will be too much of a hacker effort just to kill a table of contact emails, and also he will have to guess ( is there other way ? ) the table na

Re: [PHP] Re: Design Dilemma - Database Data Abstraction

2007-04-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-11 16:34:27 -0300: > 2007/4/11, Roman Neuhauser <[EMAIL PROTECTED]>: > > > ># [EMAIL PROTECTED] / 2007-04-09 19:45:41 -0300: > >> Thanks but that's not what I'm looking for. As I said before, my problem > >> isn't to find an implementation of an ORM, but that the conce

[PHP] Re: PHP Directory List Script Files over 2 GB

2007-04-11 Thread Robert M
Does anyone else have any other ideas how to resolve this, I have tried multiple different methods all failed. Does the 2 GB limitation using filesize have an alternate method of producing the output. ? Thank you Logan for trying. -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] UPDATE and redirect

2007-04-11 Thread Marcelo Wolfgang
and what if $_GET['id'] is something like "1; DROP TABLE tb_emails;" ?? SQL injection just waits to happen I think tha tit will be too much of a hacker effort just to kill a table of contact emails, and also he will have to guess ( is there other way ? ) the table name, but just to be on a s

Re: [PHP] Re: SQL Source Control

2007-04-11 Thread Zoltán Németh
2007. 04. 11, szerda keltezéssel 16.19-kor Colin Guthrie ezt írta: > Richard Davey wrote: > > Hi all, > > > > I know a lot of you use various means for PHP source control (CVS, SVN, > > etc), which is all well and fine, but how do you manage source control > > on your databases? > > > > Say you'v

Re: [PHP] UPDATE and redirect

2007-04-11 Thread Zoltán Németh
2007. 04. 11, szerda keltezéssel 16.57-kor Fredrik Thunberg ezt írta: > marcelo Wolfgang skrev: > > Hi all, > > > > I'm new to this list and new to php programming so sorry if I do > > something wrong here :) > > > > Ok, now to my problem. > > > > I've created a query to update a mysql db, and

Re: [PHP] PHP editor

2007-04-11 Thread Zoltán Németh
I use jEdit http://www.jedit.org/ and I like it ;) it's not specifically for php but for any kind of programming, and has nice plugins for several programming languages you might edit with it greets Zoltán Németh 2007. 04. 11, szerda keltezéssel 10.12-kor Jonathan Kahan ezt írta: > Hi all, > >

[PHP] location of the PHP executable

2007-04-11 Thread Mattias Thorslund
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 because it needs to run a second PHP script. I know about the "which" command but it's not available in all OS

Re: [PHP] Re: Design Dilemma - Database Data Abstraction

2007-04-11 Thread Martin Alterisio
2007/4/11, Roman Neuhauser <[EMAIL PROTECTED]>: # [EMAIL PROTECTED] / 2007-04-09 19:45:41 -0300: > Thanks but that's not what I'm looking for. As I said before, my problem > isn't to find an implementation of an ORM, but that the concept I'm working > on will use a very restricted API (array ope

[PHP] Re: PHP editor

2007-04-11 Thread Sady Marcos
Using with CVS, PHP Eclipse no doubt http://download.eclipse.org/tools/pdt/downloads/?release=S20070401-RC3 Unzip and execute eclipse.exe.. It's free... No CVS.. can use Zend Studio.. but isn't free... My choose is Eclipse.. ""Jonathan Kahan"" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAI

Re: [PHP] PHP textbook suggestions?

2007-04-11 Thread Chris Lott
On 4/10/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > print 'The cost is ' . $cost; > NOT > print "The cost is $cost"; > AND CERTAINLY NOT > print ("The cost is $cost"); echo "The cost is ", $cost; If you're going to be this picky, you'd better write your own textbook... :-) Perhaps instead

Re: [PHP] Re: PHP textbook suggestions?

2007-04-11 Thread Chris Lott
You're missing the point-- it's not that there is a practical difference in the examples, it's that there IS a difference, the students see it, and it is an extra point of confusion that isn't needed if one is being consistent. I completely recognize that the practical effects of the differences

Re: [PHP] SQL Source Control

2007-04-11 Thread Lori Lay
Richard Davey wrote: Hi all, I know a lot of you use various means for PHP source control (CVS, SVN, etc), which is all well and fine, but how do you manage source control on your databases? Say you've got an upgrade to a site, all of the new PHP files are controlled by SVN, so you can roll

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 10:53 -0700, [EMAIL PROTECTED] wrote: > Quoting Robert Cummings <[EMAIL PROTECTED]>: > > > On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: > > > 1- your mysql query statement is better to have a WHERE part too. > > > 2- I would use mysql_fetch_row instead of mysql

Re: [PHP] Posting a variable

2007-04-11 Thread Richard Davey
[EMAIL PROTECTED] wrote: Quoting Robert Cummings <[EMAIL PROTECTED]>: On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: 1- your mysql query statement is better to have a WHERE part too. 2- I would use mysql_fetch_row instead of mysql_fetch_assoc Ummm, why would you want to reduce c

[PHP] output gz compression

2007-04-11 Thread Eric Butera
I am just curious if anybody else has this issue. My platform is OSX 10.4.9 using a custom compiled PHP 4.4.x (4.4.6 & 4.4.7RC1) I've tried using the php.ini setting zlib.output_compression = On and also ob_start("ob_gzhandler"); directly. Each time I call up the page it crashes. On the server

Re: [PHP] Posting a variable

2007-04-11 Thread Jochem Maas
Robert Cummings wrote: > On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: >> 1- your mysql query statement is better to have a WHERE part too. >> 2- I would use mysql_fetch_row instead of mysql_fetch_assoc > > Ummm, why would you want to reduce clarity and maintainability by using > mys

Re: [PHP] Posting a variable

2007-04-11 Thread siavash1979
Quoting Robert Cummings <[EMAIL PROTECTED]>: > On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: > > 1- your mysql query statement is better to have a WHERE part too. > > 2- I would use mysql_fetch_row instead of mysql_fetch_assoc > > Ummm, why would you want to reduce clarity and maint

Re: [PHP] Re: Design Dilemma - Database Data Abstraction

2007-04-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-09 19:45:41 -0300: > Thanks but that's not what I'm looking for. As I said before, my problem > isn't to find an implementation of an ORM, but that the concept I'm working > on will use a very restricted API (array operations), and I'm having trouble > to keep it coher

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 09:59 -0700, [EMAIL PROTECTED] wrote: > 1- your mysql query statement is better to have a WHERE part too. > 2- I would use mysql_fetch_row instead of mysql_fetch_assoc Ummm, why would you want to reduce clarity and maintainability by using mysql_fetch_row()? Cheers, Rob. --

Re: [PHP] Posting a variable

2007-04-11 Thread siavash1979
1- your mysql query statement is better to have a WHERE part too. 2- I would use mysql_fetch_row instead of mysql_fetch_assoc 3- in your form, you're using a single quote. anything in between single quotes will be printed as is. you need to close your single quote and print username and open anot

Re: [PHP] Design Dilemma - Database Data Abstraction

2007-04-11 Thread Martin Alterisio
2007/4/10, Richard Lynch <[EMAIL PROTECTED]>: On Sat, April 7, 2007 11:49 am, Martin Alterisio wrote: > The solution I presented is to access, and act upon, a database as if > they > were PHP arrays, meaning that a table is presented as an array of > records. I don't quite get why you think thi

  1   2   >