[PHP] Problem with date_format() in indirect MySQL query...

2001-11-01 Thread Ryan Fischer
Hello! :) First off, please respond to me directly as I am not subscribed to the list. Thanks! :) Now then, I have a quick question I'm hoping someone can help me with. I have this class method: function query($sql, $type = 'obj') { if(!$result = @mysql_query($this-masl($sql))){

Re: [PHP] Problem with date_format() in indirect MySQL query...

2001-11-02 Thread Ryan Fischer
Mark Roedel wrote: Perhaps a quick re-read of the date_format() section of http://www.mysql.com/doc/D/a/Date_and_time_functions.html is in order? (Hint: the % characters mean something.) Thank you very much! That's odd ... in previous scripts I've written there wasn't a need for the %

Re: [PHP] Example high-profile PHP sites

2001-07-27 Thread Ryan Fischer
You wrote: While I do appreciate people's contributions, let me frame the discussion a little. The person I need to convince is an administrator of an organization within North America, and he's never heard of PHP. The response I'm hoping to provoke in him is something like this: You mean

Re: [PHP] substr question...

2001-07-27 Thread Ryan Fischer
You wrote: I am trying to receive file names but can't quite figure out the proper substr to do it: jeff.dat jeffrey.dat chris.dat tom.dat I want to receive the name to the left of the .dat Jeff $file = array(jeff.dat, jeffrey.dat, chris.dat, tom.dat); for($i=0; $icount($file); $i++){

Re: [PHP] php.net's index.php

2001-07-29 Thread Ryan Fischer
You wrote: I was wondering what I would have to do in order to have index.php load up automatcially when someone went to my domain. IE if they go to www.mydomain.com and I have index.html or index.htm there then those pages get loaded first. How could I do it so index.php, index.php3,

Re: [PHP] Large Calculations

2001-07-30 Thread Ryan Fischer
You wrote: I have a mySQL database holding baseball stats and I want to calculate rankings on these players. Now I'd obviously want this to be as fast as possible since I go through about 600 players but where is it best to make them? In the SQL command itself or in PHP? players need to

Re: [PHP] PHP_SELF

2001-07-30 Thread Ryan Fischer
You wrote: It's generally a whole lot better to do your form value checking with Javascript. It'll be faster and alot less of a waste of your server resources. IMHO, of course. :) This really isn't that true because if a user has JavaScript disabled, or is using a browser that doesn't support

Re: [PHP] What would you want in a PHP web host?

2001-08-01 Thread Ryan Fischer
You wrote: What do you think a medium sized hosting company could do to give you (the developer) better service and support? Be willing to help their users in any way they can, as far as service goes. Is access to professional PHP developers useful when an issue arises? Depends on the

Re: [PHP] Re: FAQ

2001-08-01 Thread Ryan Fischer
You wrote: I have a php book that says it stands for Personal Home Page, not sure if that is correct or not... It's not. PHP stands for PHP: Hypertext Preprocessor. It's a recursive acronym. -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General Mailing List

Re: [PHP] Replacing template variables with values?

2001-08-01 Thread Ryan Fischer
You wrote: This always works for me... eval (\$message = \$message\;); I use it in the same type of scenario you've described, and also with E-Mail bodies stored in a DB. Works like a charm. Thanks, that worked great! :D -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/

Re: [PHP] Re: [PHP-DEV] Passing JavaScript variables to PHP

2001-08-01 Thread Ryan Fischer
You wrote: location.href='mail.php?message=' + message; You need to URLEncode that message data. Not sure how JavaScript does it... probably message.urlencode() Actually, it's escape(message). -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General

Re: [PHP] Re: Hmmm?

2001-08-03 Thread Ryan Fischer
You wrote: additionally I also tend to always provide an alternative, especially if dealing with nested ifs or loops, even if just a comment... call it habit (from where I don't know). if($condition){ do this }else{ # oops, $condition didn't exist } saves a hell of alot of time when

[PHP] Problem with require(), determining context.

2001-08-06 Thread Ryan Fischer
Hello! :) I have a script that loads another script with require() and based on the context, I'd like different things to happen. So, index.php is calling the required file require.php. And when require.php is run, if there's no HTTP_REFERER and the file is index.php, everything is OK. But if

Re: [PHP] close browser

2001-08-07 Thread Ryan Fischer
You wrote: Can anybody tell me what the code to close the browser is? ALT+F4. ;) -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP] close browser

2001-08-07 Thread Ryan Fischer
You wrote: You wrote: Can anybody tell me what the code to close the browser is? ALT+F4. ;) PHP cannot execute client side actions, afaik. - k 'Twas a joke. See the winky smilie? You may all laugh now. ;) -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/

Re: [PHP] How to get the query string?

2001-08-13 Thread Ryan Fischer
You wrote: hi guys, I'd like to get the query string the browser sends to the script. The problem is that since the $HTTP_POST_VARS (or $HTTP_GET_VARS ) is an associative array I can't use numbers to point to the elements of this array. This piece of code does not work: for

Re: [PHP] IE Download twice from DB - MAJOR disaster to db users

2001-08-13 Thread Ryan Fischer
You wrote: very amusing indeed. Go learn php and when youll have answer send it or stfu. you might start with your own site: www.PHPBeginner.com and then go to http://logos.uoregon.edu/explore/socioling/politeness.html to learn how to behave ! Its amazing how many people are rude ! I

Re: [PHP] a bit off the list but should be easy

2001-08-15 Thread Ryan Fischer
You wrote: Note that the download font thing is Internet Exploder Specific. Internet Exploder also has a few issues with different charsets. Also note that *all* html documents should have a specified charset - even the plain english ones. Most of the html on the internet is coded wrongly,

Re: [PHP] If-statement

2001-08-29 Thread Ryan Fischer
You wrote: Is it possible to write this shorter: if ($Var != No1 $Var != No2 $Var != No3) { code }; if(!ereg(^No[1-3]$, $Var)){ // code } -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Assign multiple variables from mysql_fetch_row() call

2001-09-04 Thread Ryan Fischer
You wrote: ($var1, $var2) is magic. I hate magic. It's not magic. It's just simpler. What do you look up in the Perl manual when you hit syntax like that? http://www.perldoc.com/perl5.6/pod/perldata.html In PHP the equivalent syntax is: list($var1, $var2) = ... Which is longer, and

Re: [PHP] Assign multiple variables from mysql_fetch_row() call

2001-09-05 Thread Ryan Fischer
You wrote: ($var1, $var2) is magic. I hate magic. It's not magic. It's just simpler. What do you look up in the Perl manual when you hit syntax like that? http://www.perldoc.com/perl5.6/pod/perldata.html I said what not where. I still maintain that if you don't know

Re: [PHP] Assign multiple variables from mysql_fetch_row() call

2001-09-05 Thread Ryan Fischer
You wrote: Sure it is. Lists or list context. () is not that hard to determine what it means. At least, not nearly as hard as you make it out to be for any moderately-experienced programmer. So it's easy to look it up is if you already know what it does? I think the majority of people

Re: [PHP] Assign multiple variables from mysql_fetch_row() call

2001-09-05 Thread Ryan Fischer
Which is why you see spoofs like this one http://bbspot.com/News/2001/03/perl_test.html The Perl code in that spoof isn't even valid. ;) And besides, the fact that you can write Perl code that looks like that and still functions is more of a feature than anything. Code that is written like

Re: [PHP] insert space to a string (newbie)

2001-09-08 Thread Ryan Fischer
You wrote: I have a simple question... How can a space inserted to a string after the 3rd char ?? washington - was hington $str = 'washington'; $str = ereg_replace('^(.{3})(.*)$', '\\1 \\2', $str); -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General

Re: [PHP] PHP vs Perl question

2001-07-19 Thread Ryan Fischer
I'm pretty new to programming - besides JavaScript, PHP is really the first language I've used. I'm just wondering, and I'm sure you all would know - should I learn Perl? Is it considered a necessity for a web developer to know Perl, or is it not a worthwhile endeavor, considering how easy

Re: [PHP] MySQL Query

2001-07-19 Thread Ryan Fischer
You wrote: I have a table that looks like Name | Type | X | Y Foo| Ship | 9 | 29 Bar| Base | 9 | 29 Is there any way I can write a query that selects everything with Type = Base, and X and Y = Foo's X and Y? ie Select * from table where type = Base and X = {Foo:X} and Y =

Re: [PHP] Re: array question

2001-07-19 Thread Ryan Fischer
You wrote: Also, consider using print or echo as opposed to printf. And lastly, you really don't need to use mysql_free_result, PHP does this automagically after the script dies. Sorry for picking on you, you may have your reasons. ;-) Really? Then why was it that, when I neglected to use

Re: [PHP] MySQL Query

2001-07-19 Thread Ryan Fischer
You wrote: Ryan Fischer [EMAIL PROTECTED] wrote in message 01d901c1101e$9cd43220$80c93fd0@ryan">news:01d901c1101e$9cd43220$80c93fd0@ryan... You wrote: I have a table that looks like Name | Type | X | Y Foo| Ship | 9 | 29 Bar| Base | 9 | 29 Is there any way I c

Re: [PHP] Capitalize Function ??

2001-07-24 Thread Ryan Fischer
You wrote: So sprach »PHP Junkie« am 2001-07-23 um 21:39:07 -0400 : I'm taking in first name and last name data into a MySQL db through a form. Users sometimes don't capitalize their first and last names when entering the data. Is there a function to clean this up for consistency? If

Re: [PHP] Capitalize Function ??

2001-07-24 Thread Ryan Fischer
You wrote: So sprach »Ryan Fischer« am 2001-07-24 um 07:35:37 -0400 : Usually, the 3rd is written as John Doe, III, AFAIK, so that's not really an issue. Okay, III isn't an issue then. What about people with Dr. titles? Like 'Dr. med John Doe'. There the 'med' shouldn't be capitalized

Re: [PHP] bad word filter

2001-07-24 Thread Ryan Fischer
You wrote: I've been reading the Profanity Filter thread in the list archives but haven't found anything real helpful. Here's my code so far, this of course won't work. ? function filterWords($string, $result) { $badwords=shit, fuck, ass, bitch; $word=explode(, ,