[PHP] Confused

2008-09-02 Thread Dan Shirah
All, Okay, I am a bit confused. I'm setting up another server to host PHP pages. I followed everything in the Manual for installing PHP. I'm running Windows Server 2003, IIS6.0 and PHP 5.2.6. And...it kind of works... If I do: ?php echo Test; ? it prints fine. If I do: Today is: ?php echo

RE: [PHP] Confused

2008-09-02 Thread Simcha
PROTECTED] Sent: Tuesday, September 02, 2008 7:31 PM To: PHP List Subject: [PHP] Confused All, Okay, I am a bit confused. I'm setting up another server to host PHP pages. I followed everything in the Manual for installing PHP. I'm running Windows Server 2003, IIS6.0 and PHP 5.2.6. And...it kind

Re: [PHP] Confused

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 13:31 -0400, Dan Shirah wrote: All, Okay, I am a bit confused. I'm setting up another server to host PHP pages. I followed everything in the Manual for installing PHP. I'm running Windows Server 2003, IIS6.0 and PHP 5.2.6. And...it kind of works... If I do:

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
Message- From: Dan Shirah [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2008 7:31 PM To: PHP List Subject: [PHP] Confused All, Okay, I am a bit confused. I'm setting up another server to host PHP pages. I followed everything in the Manual for installing PHP. I'm running

RE: [PHP] Confused

2008-09-02 Thread Simcha
Ignore my previous email - It was sloppy. I was not focusing on the email. SY -Original Message- From: Simcha [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2008 8:41 PM To: 'Dan Shirah'; 'PHP List' Subject: RE: [PHP] Confused This does not seem to be an installation problem

Re: [PHP] Confused

2008-09-02 Thread brian
Dan Shirah wrote: All, Okay, I am a bit confused. I'm setting up another server to host PHP pages. I followed everything in the Manual for installing PHP. I'm running Windows Server 2003, IIS6.0 and PHP 5.2.6. And...it kind of works... If I do: ?php echo Test; ? it prints fine. If I do:

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
Add the following: ?php echo 'pre'.\n print_r( $_SERVER ); echo '/pre'.\n; ? See if the AUTH_USER entry is in there. AUTH_USER shows up, but does not have a value. From the output of phpinfo() it says, No value How do you know you don't get a connection to the database? What is the

Re: [PHP] Confused

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:27 -0400, Dan Shirah wrote: Add the following: ?php echo 'pre'.\n print_r( $_SERVER ); echo '/pre'.\n; ? See if the AUTH_USER entry is in there. AUTH_USER shows up, but does not have a value. From the output of phpinfo() it says, No value

Re: [PHP] Confused

2008-09-02 Thread Eric Butera
if($a = false){echo no good;}else{echo condition true;} ? -Original Message- From: Dan Shirah [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2008 7:31 PM To: PHP List Subject: [PHP] Confused All, Okay, I am a bit confused. I'm setting up another server to host PHP pages

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
So you're script runs long enough for you to check? Cheers, Rob. if (!$connect_id = ifx_connect([EMAIL PROTECTED], $user, $pass)) { Checks to see if it doesn't connect. If it does connect the page continues to process. If it doesn't connect the error is displayed. echo Unable to connect

Re: [PHP] Confused

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:43 -0400, Dan Shirah wrote: So you're script runs long enough for you to check? Cheers, Rob. if (!$connect_id = ifx_connect([EMAIL PROTECTED], $user, $pass)) { Checks to see if it doesn't connect. If it does connect the page

Re: [PHP] Confused

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:46 -0400, Robert Cummings wrote: On Tue, 2008-09-02 at 14:43 -0400, Dan Shirah wrote: So you're script runs long enough for you to check? Cheers, Rob. if (!$connect_id = ifx_connect([EMAIL PROTECTED], $user, $pass)) {

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
Your script is dying then. What does the error log say? Are you sure PHP is using the php.ini you think it's using? Double check by using phpinfo(). Cheers, Rob. It is VERY strange! phpinfo() shows that it is using C:\Windows\php.ini phpinfo() also shows display_errors = Off but when I

Re: [PHP] Confused

2008-09-02 Thread Robert Cummings
On Tue, 2008-09-02 at 14:58 -0400, Dan Shirah wrote: Your script is dying then. What does the error log say? Are you sure PHP is using the php.ini you think it's using? Double check by using phpinfo(). Cheers, Rob. It is

Re: [PHP] Confused

2008-09-02 Thread Diogo Neves
On Tue, Sep 2, 2008 at 7:58 PM, Dan Shirah [EMAIL PROTECTED] wrote: Your script is dying then. What does the error log say? Are you sure PHP is using the php.ini you think it's using? Double check by using phpinfo(). Cheers, Rob. It is VERY strange! phpinfo() shows that it is

Re: [PHP] Confused

2008-09-02 Thread Diogo Neves
On Tue, Sep 2, 2008 at 8:04 PM, Robert Cummings [EMAIL PROTECTED]wrote: On Tue, 2008-09-02 at 14:58 -0400, Dan Shirah wrote: Your script is dying then. What does the error log say? Are you sure PHP is using the php.ini you think it's using? Double check by

Re: [PHP] Confused

2008-09-02 Thread David Giragosian
On 9/2/08, Dan Shirah [EMAIL PROTECTED] wrote: Your script is dying then. What does the error log say? Are you sure PHP is using the php.ini you think it's using? Double check by using phpinfo(). Cheers, Rob. It is VERY strange! phpinfo() shows that it is using

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
Does your script, the apache conf, virtual host conf, or a .htaccess conf modify this setting? perhaps php.ini has more than one display_errors entries? Cheers, Rob. PROGRESS! It just clicked! About 3 years ago when I setup my first PHP server on Windows I saw someone mention that

Re: [PHP] Confused

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 2:49 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Tue, 2008-09-02 at 14:46 -0400, Robert Cummings wrote: On Tue, 2008-09-02 at 14:43 -0400, Dan Shirah wrote: So you're script runs long enough for you to check? Cheers, Rob. if

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
Yea I thought the same that is why I recommended the looking at logs idea. Perhaps maybe just running form cli will do it: [EMAIL PROTECTED]:~/Sites$ php5 blah.php Point 1 Fatal error: Call to undefined function ifx_connect() in /home/eric/Sites/blah.php on line 3 You probably don't

Re: [PHP] Confused

2008-09-02 Thread Eric Butera
On Tue, Sep 2, 2008 at 3:15 PM, Dan Shirah [EMAIL PROTECTED] wrote: Yea I thought the same that is why I recommended the looking at logs idea. Perhaps maybe just running form cli will do it: [EMAIL PROTECTED]:~/Sites$ php5 blah.php Point 1 Fatal error: Call to undefined function

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
[SOLVED] Just wanted to let you all know I resolved all my problems. AUTH_USER holds a value once I go into IIS/Default Website and go tot he properties of my application folder. Deselect the Anonymous Access and check Intergrated Windows Authentication. For my connection issue I needed

Re[2]: [PHP] Confused about handling bytes

2007-05-21 Thread Tom Rogers
Hi, Monday, May 21, 2007, 3:57:56 PM, you wrote: TR Hi, TR Monday, May 21, 2007, 10:50:27 AM, you wrote: JV While I'm sure this is a stupid question and the solution will be JV obvious to everyone here, this is confusing me. JV I'm trying to control a device over a serial port using a PHP

[PHP] Confused about handling bytes

2007-05-20 Thread Joe Veldhuis
While I'm sure this is a stupid question and the solution will be obvious to everyone here, this is confusing me. I'm trying to control a device over a serial port using a PHP script, and one of the things I need to do is read a 26-byte string from an EEPROM, using a command that returns two

Re: [PHP] Confused about handling bytes

2007-05-20 Thread Tom Rogers
Hi, Monday, May 21, 2007, 10:50:27 AM, you wrote: JV While I'm sure this is a stupid question and the solution will be JV obvious to everyone here, this is confusing me. JV I'm trying to control a device over a serial port using a PHP script, JV and one of the things I need to do is read a

[PHP] Confused about how exactly to output image using imagepng function

2007-05-17 Thread Dave M G
PHP list, I've looked at the manual entries for imagepng() and imagecreatetruecolor() functions for helping me to create a temporary image for a CAPTCHA system. However, I'm clearly messing up, as what I'm outputting is a bunch of ASCII gibberish to the screen. What I think I need to do

Re: [PHP] Confused about how exactly to output image using imagepng function

2007-05-17 Thread Tijnema !
On 5/17/07, Dave M G [EMAIL PROTECTED] wrote: PHP list, I've looked at the manual entries for imagepng() and imagecreatetruecolor() functions for helping me to create a temporary image for a CAPTCHA system. However, I'm clearly messing up, as what I'm outputting is a bunch of ASCII gibberish

Re: [PHP] Confused about how exactly to output image using imagepng function

2007-05-17 Thread Stephen
Save the image as a file. Then html src=filename Dave M G [EMAIL PROTECTED] wrote: PHP list, I've looked at the manual entries for imagepng() and imagecreatetruecolor() functions for helping me to create a temporary image for a CAPTCHA system. However, I'm clearly messing up, as what I'm

Re: [PHP] Confused about how exactly to output image using imagepng function

2007-05-17 Thread Zoltán Németh
2007. 05. 17, csütörtök keltezéssel 14.49-kor Tijnema ! ezt írta: On 5/17/07, Dave M G [EMAIL PROTECTED] wrote: PHP list, I've looked at the manual entries for imagepng() and imagecreatetruecolor() functions for helping me to create a temporary image for a CAPTCHA system. However,

[PHP] Confused on the status of a bogus bug report

2007-01-08 Thread Bill Moran
With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that infinite recursion within PHP is a bug. Shouldn't the interpreter catch this sort of thing before it

Re: [PHP] Confused on the status of a bogus bug report

2007-01-08 Thread Jochem Maas
Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that infinite recursion within PHP is a bug. Shouldn't the interpreter catch this

Re: [PHP] Confused on the status of a bogus bug report

2007-01-08 Thread Chris
Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that infinite recursion within PHP is a bug. Shouldn't the interpreter catch this sort of

Re: [PHP] Confused on the status of a bogus bug report

2007-01-08 Thread Robert Cummings
On Mon, 2007-01-08 at 23:59 +0100, Jochem Maas wrote: Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that infinite recursion

Re: [PHP] Confused on the status of a bogus bug report

2007-01-08 Thread Robert Cummings
On Tue, 2007-01-09 at 10:01 +1100, Chris wrote: Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that infinite recursion within

Re: [PHP] Confused on the status of a bogus bug report

2007-01-08 Thread Chris
Robert Cummings wrote: On Tue, 2007-01-09 at 10:01 +1100, Chris wrote: Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that infinite

Re: [PHP] Confused on the status of a bogus bug report

2007-01-08 Thread Jochem Maas
Robert Cummings wrote: On Mon, 2007-01-08 at 23:59 +0100, Jochem Maas wrote: Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that

Re: [PHP] Confused on the status of a bogus bug report

2007-01-08 Thread Robert Cummings
On Tue, 2007-01-09 at 01:11 +0100, Jochem Maas wrote: Robert Cummings wrote: On Mon, 2007-01-08 at 23:59 +0100, Jochem Maas wrote: Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as

[PHP] confused about where to load images

2006-10-05 Thread Meline Martirossian
Hello, I have just made my first php mini website. I have my header, footer, navigation and main pages. The header, footer and navigation appear as includes in my main page. When I click on my navigation links, I get a new blank browser window with the image on it. This is not what I want.

Fwd: [PHP] confused about where to load images

2006-10-05 Thread mel
= . $row['pix'] . border='0' {$row['jobType']} /a ; } - Original Message - From: Mel To: Jeremy Jefferson Sent: Thursday, October 05, 2006 7:00 AM Subject: Re: [PHP] confused about where to load images Hello Jeremy and thank you so much for your reply. I am not sure where to add your code

Re: [PHP] confused about where to load images

2006-10-05 Thread Richard Lynch
On Thu, October 5, 2006 5:15 am, Meline Martirossian wrote: I have just made my first php mini website. I have my header, footer, navigation and main pages. The header, footer and navigation appear as includes in my main page. When I click on my navigation links, I get a new blank browser

Re: [PHP] Confused about how to best execute php scripts in /cgi-bin/

2005-09-07 Thread KEVIN ZEMBOWER
Disappointed that there was no response to this message, I nevertheless seemed to have solved the problem by adding AddHandler php-script .php to the Directory stanza for my /cgi-bin/ directory. For the archives, in case anyone is searching for this answer, too. -Kevin KEVIN ZEMBOWER [EMAIL

[PHP] Confused about how to best execute php scripts in /cgi-bin/

2005-09-06 Thread KEVIN ZEMBOWER
I'm trying to allow php scripts to execute from the /cgi-bin/ directory, which is currently set up as a ScriptAlias in my Apache2 configuration. I've found lots of references to this, but there seems to be a couple of different ways to accomplish this, and I can't tell which one is recommended

RE: [PHP] Confused - $GLOBALS

2004-12-10 Thread Richard Lynch
I always forget, because they changed it around on POST/GLOBALS/etc at some point, but only on some of them. Grrr. The built-in arrays with names beginning $_ are superglobals, i.e. always global anyway. The only other superglobal is $GLOBALS, which is a anming exception because it

RE: [PHP] Confused - $GLOBALS

2004-12-10 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 09 December 2004 20:41, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; No, he doesn't. in the function that uses $_POST.

[PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions cannot grab the item_pics1 variable. I have tried passing the variable to the function, tried using $GLOBALS['item_pic1']. So I guess my question is, does PHP in

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread John Nichel
Danny Brow wrote: Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions cannot grab the item_pics1 variable. I have tried passing the variable to the function, tried using $GLOBALS['item_pic1']. So I guess my

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread John Nichel
Belay that...the $GLOBALS array has existed since PHP3 -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 13:41 -0500, John Nichel wrote: Danny Brow wrote: Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions cannot grab the item_pics1 variable. I have tried passing the variable to the

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Richard Lynch
My best guess from skimming your code is that you need: global $_POST; in the function that uses $_POST. Or is $_POST always global anyway? I always forget, because they changed it around on POST/GLOBALS/etc at some point, but only on some of them. Grrr. -- Like Music?

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; should I put this at the top of my code with the rest of my variables? in the function that uses $_POST. Or is $_POST always global anyway? No. I always

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 15:39 -0500, Roger Spears wrote: Danny Brow wrote: On Thu, 2004-12-09 at 13:41 -0500, John Nichel wrote: Danny Brow wrote: Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; in the function that uses $_POST. Or is $_POST always global anyway? I always forget, because they changed it around on POST/GLOBALS/etc at some point, but

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Jason Wong
On Friday 10 December 2004 04:48, Danny Brow wrote: On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; should I put this at the top of my code with the rest of my variables? No in the function that uses

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread John Nichel
Danny Brow wrote: snip function html_template() { global $item_pics1; if (file_exists('item.html')) { print This is item_pics1 . $item_pics1; $html_template = $GLOBALS['html_template']; $html_template = str_replace('{item_pictures}', $item_pics1, $html_template);

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Jason Wong
On Friday 10 December 2004 04:52, Danny Brow wrote: OK, you never said what your problem was except to say everything works but the str_replace item_pics1. Did you check $GLOBALS['errors'] after calling this function? function html_template() { global $item_pics1; if

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Fri, 2004-12-10 at 05:52 +0800, Jason Wong wrote: On Friday 10 December 2004 04:52, Danny Brow wrote: OK, you never said what your problem was except to say everything works but the str_replace item_pics1. Did you check $GLOBALS['errors'] after calling this function? No but I'm doing

[PHP] Confused with constructors

2004-11-19 Thread Gerald Wharney
I'm trying the example at: http://www.php.net/manual/en/language.oop.constructor.php ?php class A { function A() { echo I am the constructor of A.br /\n; } function B() { echo I am a regular function named B in class A.br /\n; echo I am not a constructor in

Re: [PHP] Confused with constructors

2004-11-19 Thread Gareth Williams
Try this: class base_object() { function base_object() { echo I'm the base; } function base_test() { echo I'm the base test; } } class extended_object() extends base_object { function extended_object()

[PHP] confused about magic quotes

2004-09-17 Thread Christopher-Robin
Hi! I got a problem: The server im running my scripts on has magic_quotes_gpc=ON. I know, that i just have to stripslashes() the GPC data. But what if magic_quotes_sybase is also set ON? The doc says, that in this case only ' is replaced by '', and nothing happens to , \ and NUL, because

[PHP] Confused overSimple PHP mySQL date question

2004-09-14 Thread Scott Miller
Hi, I have checked the recent list archives and looked up various PHP functions. I know what I want should be simple but, apparently not simple enought for me. I have a mysql database that has a date field and a time field. I want users to be able to enter a date and a time in text boxes on

RE: [PHP] Confused overSimple PHP mySQL date question

2004-09-14 Thread Jay Blanchard
[snip] DATE field in a mysql database. What obvuios thing did I miss? Note I am not using the system date or time stamp, these are entered dates. [/snip] You're using a DATE field in the MySQL database. MySQL requires an ISO formatted date unless you manipulate it, such as 2004-09-14

Re: [PHP] Confused overSimple PHP mySQL date question

2004-09-14 Thread John Holmes
From: Scott Miller [EMAIL PROTECTED] I have a mysql database that has a date field and a time field. I want users to be able to enter a date and a time in text boxes on an html form and have them end up in the database. Code examples would be good here. Either way, the format for a DATE field is

[PHP] Confused...need some programming logic

2004-08-04 Thread PHP Gen
Hi, I have 13 folders with a few thousand images each, now the client wants me to export the gallerys to another server that does not run phpso he wants plain .htm files. Below is how far I have come to porting this... the idea being: generate .html files then simply copy the images folders

Re: [PHP] Confused...need some programming logic

2004-08-04 Thread Justin Patrin
On Wed, 4 Aug 2004 15:06:45 -0700 (PDT), PHP Gen [EMAIL PROTECTED] wrote: Hi, I have 13 folders with a few thousand images each, now the client wants me to export the gallerys to another server that does not run phpso he wants plain .htm files. Below is how far I have come to porting

Re: [PHP] Confused...need some programming logic

2004-08-04 Thread PHP Gen
--- Justin Patrin [EMAIL PROTECTED] wrote: 4: put 100 img tags to call 100 images per page (confused here) I put some code inline below. Should work. If you want a thumbnail gallery, you could also create thumbnails using the GD functions in PHP, same them, and create an img tag with

Re: [PHP] Confused...need some programming logic

2004-08-04 Thread Justin Patrin
On Wed, 4 Aug 2004 15:40:03 -0700 (PDT), PHP Gen [EMAIL PROTECTED] wrote: --- Justin Patrin [EMAIL PROTECTED] wrote: 4: put 100 img tags to call 100 images per page (confused here) I put some code inline below. Should work. If you want a thumbnail gallery, you could also create

Re: [PHP] Confused...need some programming logic

2004-08-04 Thread PHP Gen
Hey, Just change the echo to an fwrite. for($j = 0; $j 100; ++$j) { if($pics[$i * 100 + $j]) { fwrite($handle, 'img src='.$pics[$i * 100 + $j].'/br/'); } } Works like a charm, thanks a million. -Mag = -- - The faulty interface lies between the chair and the keyboard. -

RE: [PHP] confused big time

2004-04-07 Thread Robert Cummings
On Tue, 2004-04-06 at 20:09, Chris W. Parker wrote: Chris W. Parker on Tuesday, April 06, 2004 5:01 PM said: let me expand both of my points in an attempt to be more verbose. 1. write readable queries. 2. always put single quotes around array keys. $array['key'] here is how i

Re: [PHP] confused big time

2004-04-07 Thread Mark Ackroyd
I always found this way of inserting data into a database messy. Here is a handy function to do array inserts and it builds the sql for you. function arrayINSERT($a,$tablename) { $sql = INSERT INTO $tablename (; foreach($a as $key = $value)

Re: [PHP] confused big time

2004-04-07 Thread John W. Holmes
From: Mark Ackroyd [EMAIL PROTECTED] I always found this way of inserting data into a database messy. Here is a handy function to do array inserts and it builds the sql for you. function arrayINSERT($a,$tablename) { $sql = INSERT INTO $tablename (; foreach($a as $key = $value) { $sql

Re[2]: [PHP] confused big time

2004-04-07 Thread Richard Davey
Hello Mark, Wednesday, April 7, 2004, 5:16:04 PM, you wrote: MA it builds the sql statement for you. It covers 99.9% of the inserts MA your likely to need. I use an update and insert function like this all MA the time. :-) That .1% of the time being when you need to insert a value as now() ?

Re: [PHP] confused big time

2004-04-07 Thread Mark Ackroyd
RD That .1% of the time being when you need to insert a value as now() ? RD (which will break the string check as it'll wrap it with '' which will RD cause MySQL to insert -00-00 00:00:00) or if it's an enum field RD with a numeric allowed value? :) Not really, since you usally format a

Re[2]: [PHP] confused big time

2004-04-07 Thread Richard Davey
Hello Mark, Wednesday, April 7, 2004, 6:19:31 PM, you wrote: RD That .1% of the time being when you need to insert a value as now() ? RD (which will break the string check as it'll wrap it with '' which will RD cause MySQL to insert -00-00 00:00:00) or if it's an enum field RD with a numeric

Re: [PHP] confused big time

2004-04-07 Thread Mark Ackroyd
RD But now() IS a DB friendly format for MySQL and is the recommended RD way of inserting the current time into a datetime or timestamp RD field. But what about MsSQL, Oracle and postgres to name a few. I have worked on a few projects where you read from one db and load into another db. Dates

Re[2]: [PHP] confused big time

2004-04-07 Thread Richard Davey
Hello Mark, Wednesday, April 7, 2004, 6:35:31 PM, you wrote: MA But what about MsSQL, Oracle and postgres to name a few. I have worked MA on a few projects where you read from one db and load into another db. MA Dates then become the spawn of satan. But the MySQL syntax for insert is not the

Re: [PHP] confused big time

2004-04-07 Thread Red Wingate
You could even do: $sql .= ( '.implode( ',' , $a ).' ); This way everything is quoted though ( but this doesn't matter using MySQL anyway ). If you want to escape the values of $a you could use array_map to do this also without having to loop :-) -- red [...] To get your list of columns,

RE: [PHP] confused big time

2004-04-07 Thread Chris W. Parker
Andy B mailto:[EMAIL PROTECTED] on Tuesday, April 06, 2004 7:56 PM said: $query=insert into table values( '{$array['index1']['index2']}', '{$array[index2']['index3']}', //so on down the list ); if i understand the readable way right... no, not quite. here is how you should do it

Re: [PHP] confused big time

2004-04-07 Thread Andy B
- Original Message - From: Chris W. Parker [EMAIL PROTECTED] To: Andy B [EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 6:30 PM Subject: RE: [PHP] confused big time Andy B mailto:[EMAIL PROTECTED] on Wednesday, April 07, 2004 2:09 PM said: yes you can absolutely do it that way

[PHP] confused big time

2004-04-06 Thread Andy B
hi... i have 2 mysql queries first one: //the extra { at the beginning and the extra , at the end of //each variable should be an '... insert into $EventsTable values(NULL, '{$_SESSION[add][type]}', '{$_SESSION[add][start_date]}', '{$_SESSION[add][end_date]}', '{$_SESSION[add][name]}',

RE: [PHP] confused big time

2004-04-06 Thread Chris W. Parker
Andy B mailto:[EMAIL PROTECTED] on Tuesday, April 06, 2004 4:51 PM said: they both use the same identical format to insert the arrays. there is an interesting problem though: the first one complains about use of undefined constant add - assumed 'add' in the second query...the first one

[PHP] confused big time

2004-04-06 Thread Andy B
two things i would recommend before disecting your code. 1. write readable queries. GOOD: $sql = SELECT name , age , height , etc FROM user WHERE name = '$name' AND height = '5'; 2. always

RE: [PHP] confused big time

2004-04-06 Thread Chris W. Parker
Chris W. Parker on Tuesday, April 06, 2004 5:01 PM said: let me expand both of my points in an attempt to be more verbose. 1. write readable queries. 2. always put single quotes around array keys. $array['key'] here is how i would write your query: ?php $sql = insert into

[PHP] confused big time

2004-04-06 Thread Andy B
MINE: $sql = SELECT name , age , height , etc FROM user WHERE name = '$name' AND height = '5'; um...im not doing selects im doing inserts with variable names... i understand the idea with

Re: [PHP] confused big time

2004-04-06 Thread Richard Davey
Hello Andy, Wednesday, April 7, 2004, 1:06:52 AM, you wrote: AB 1. how were those queries unreadable?? and You're kidding, right? AB 2. whenever i put '' around the array keys in multi dimensional arrays in a AB query i get a parse error of trying to use undefined keys or it doesnt AB expand

Re: [PHP] confused big time

2004-04-06 Thread Richard Davey
Hello Andy, Wednesday, April 7, 2004, 1:18:06 AM, you wrote: AB um...im not doing selects im doing inserts with variable names... i AB understand the idea with select but thats not the dealits an insert... He was showing you a neatly formatted query, the example applies to inserts too:

[PHP] [fixed!][PHP] confused big time

2004-04-06 Thread Andy B
ok query is fixed for the second one now... now to work on the if(!empty.. tests i have to check and make sure every one of those arrays isnt empty. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] confused big time

2004-04-06 Thread Chris W. Parker
Andy B mailto:[EMAIL PROTECTED] on Tuesday, April 06, 2004 5:18 PM said: um...im not doing selects im doing inserts with variable names... i understand the idea with select but thats not the dealits an insert... i was hoping that wouldn't cause any confusion, but i guess it did. the

RE: [PHP] confused big time

2004-04-06 Thread Martin Towell
um...im not doing selects im doing inserts with variable names... i understand the idea with select but thats not the dealits an insert... i was hoping that wouldn't cause any confusion, but i guess it did. the thing to remember is that a query is a query. you know, parts is

Re: [PHP] confused big time

2004-04-06 Thread Andy B
He was showing you a neatly formatted query, the example applies to inserts too: $sql = INSERT INTO tablename ( field1, field2, field3 ) VALUES ( '$blah', $here',

Re: [PHP] confused big time

2004-04-06 Thread Andy B
AB 1. how were those queries unreadable?? and You're kidding, right? sorry...my bad... never had any writing readable code help anywhere...guess if i do it like c/c++ then it would work better AB 2. whenever i put '' around the array keys in multi dimensional arrays in a AB query i get a

Re: [PHP] confused big time

2004-04-06 Thread Andy B
i was hoping that wouldn't cause any confusion, but i guess it did. the thing to remember is that a query is a query. you know, parts is parts. oops stress and the fact that im sort of new at this stuff mixed me up... $query=insert into table values( '{$array['index1']['index2']}',

[PHP] confused about logic

2004-03-19 Thread Aaron Wolski
Hi All, I have input for where users can enter order numbers in which to search the database to find results matching their entry. To enter multiple order numbers they can comma separate like: 1,34,21,34,54 What I need to do is take those numbers and make a query that would like like:

Re: [PHP] confused about logic

2004-03-19 Thread Chris Boget
To enter multiple order numbers they can comma separate like: 1,34,21,34,54 What I need to do is take those numbers and make a query that would like like: (cart_id in('1','34','21','34','54') OR id in('1','34','21','34','54')) ANY idea how I can accomplish this? $string = ' . implode( ', ',

Re: [PHP] confused about logic

2004-03-19 Thread John W. Holmes
From: Aaron Wolski [EMAIL PROTECTED] I have input for where users can enter order numbers in which to search the database to find results matching their entry. To enter multiple order numbers they can comma separate like: 1,34,21,34,54 What I need to do is take those numbers and make a

RE: [PHP] confused about logic

2004-03-19 Thread Aaron Wolski
Chris! Thanks so much. This worked perfectly Aaron -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED] Sent: March 19, 2004 10:59 AM To: Aaron Wolski; [EMAIL PROTECTED] Subject: Re: [PHP] confused about logic To enter multiple order numbers they can comma

RE: [PHP] confused about logic

2004-03-19 Thread Aaron Wolski
; [EMAIL PROTECTED] Subject: Re: [PHP] confused about logic From: Aaron Wolski [EMAIL PROTECTED] I have input for where users can enter order numbers in which to search the database to find results matching their entry. To enter multiple order numbers they can comma separate like

Re: [PHP] confused about logic

2004-03-19 Thread Chris Boget
Thanks for the time John. Chris's did the trick. I'll keep yours on hand in case I do happen to run into problems. I DO appreciate your help. John's solution is actually technically better than mine in that it's only using one function call (str_replace()) and as such only one possible point

[PHP] Confused a little with = to and grater than ...

2003-03-15 Thread Philip J. Newman
Well i thought about changeing access levels into numbers so that only LARGER numbers can access lower numbers and Lower numbers can't access anything higher ... if that makes sence ... So 3 can access 2 and 1, 2 can't access 3, but can access 2 and 1 and one can't access 2 or 3, but can 1 ...

RE: [PHP] Confused a little with = to and grater than ...

2003-03-15 Thread Dennis Cole
; } ? -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED] Sent: Saturday, March 15, 2003 8:29 PM To: [EMAIL PROTECTED] Subject: [PHP] Confused a little with = to and grater than ... Importance: Low Well i thought about changeing access levels into numbers so that only LARGER numbers can

[PHP] Confused about $_SESSION and $_COOKIE scope..

2002-12-06 Thread Chad Day
I'm not sure why this isn't working, been banging my head at it for a couple hours now. I have a file (index.php), which calls a function that draws the header to my page. Inside that function (site_header), is an include to a file (menu.php) which draws dynamic javascript menus based on cookie

  1   2   >