[PHP-DB] Stange PHP bug?

2003-08-28 Thread Chris Payne
Hi There,

I'm developing a website for my boss, and it works PERFECTLY for me and everyone else 
i've shown it too, but when my boss goes to the page anything that is PHP related just 
doesn't show up on his machine.

He is using Windows XP with Explorer 6, just like my development machine, but no PHP 
or Databases show up, it's just either the background images OR after an hour he gets 
a timeout - but he's the only person who has this problem.  Has anyone seen this 
before?  I'm sure it's not a PHP/MySQL error as a script either works or it doesn't, 
could it be his installation of Explorer?  He's on dialup in the UK, but my friend 
from the UK is on broadband with the same setup and it works fine for him.

Sorry this isn't an actual PHP/MySQL technical question, but I thought that somebody 
might be able to back me up as I think it's his browser.

Any thought?

Chris

Re: [PHP-DB] serving up images

2003-08-28 Thread John W. Holmes
Matthew Horn wrote:

I have about 25 or so images that I would like to serve up on my site's home page. I would like the image to change every 3 days or so. Does anyone have a hint as to how I might go about doing this in a simple fashion? 

I don't want it to be random, but I do want it to cycle through the images and then start over again. 

Some initial thoughts: 
I could just set up a custom index rather than a simple series (1,2,3...). I could then serve up the image that matches the current day of the month or matches a day range. But this gets tricky because I don't have exactly 31 images, and there are obviously shorter months. AND, I want to be able to enter more images without breaking the code.

I could do it randomly, and also store an exclusion list, so every three days, my page gets a new random image whose index is not stored in this exclusion list. This seems like the most likely approach, but sounds like extra work.

Any ideas? tnks


Well, it's certainly possible. You can use opendir() and readdir() (or 
the dir object) to read the file names from a directory, choose three of 
them, and output their paths to the img tags.

You could incorporate another file that remembers the last image you 
chose, then when it picks the next 3, it'll start from that point. As 
long as you order the results the same each time (sort(), ksort(), etc), 
you should be fine.

If you want the script written for you, contact me offline.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] i am so Lost with Php

2003-08-28 Thread marionh
I bought my own domain and have Php on it and Myslq..i have no idea what
these are or how to use the php to set up a guestbook, etc..Is there any
sites that would tell me how step by step..My host would do it for a fee and
I want to do it myself
thanks
marion

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Can anyone see why unlink isn't working?

2003-08-28 Thread Chris Payne
Hi there everyone,

I have image details stored in my DB, and i'm trying to remove the ones I select, but 
I keep getting an error saying that there is an unexpected T_Variable, can anyone see 
what is wrong here?  It's probably obvious, but for the life of me 

if (count($del) = 1) { 
for ($i=0;$icount($del);$i++) { 

$nameb = $del[$i];

echo $nameb;

unlink($path$nameb);

};

Thanks for any help :-)

Chris

[PHP-DB] Forget my last post

2003-08-28 Thread Chris Payne
Sorry everyone, forget my last post about the T_Variable, I was right it WAS a stupid 
question LOL :-)

Chris

[PHP-DB] Re: about resultset internal pointer

2003-08-28 Thread Peng Cheng
I agree what David says.

but the point is if someone else moved the pointer using mysql_data_seek($i)
and he didn't tell me how much $i is, or I use mysql_data_seek so many times
that I can't remember the sum of the offsets.

I don't think write a tracker is a feasible way, because there are so many
actions can move pointer, mysql_data_seek(), mysql_fetch_row(),
mysql_fetch_array() etc. Tracking all these actions is not possible, and it
is error-prone and needs much much effort.

David Robley [EMAIL PROTECTED]
??:[EMAIL PROTECTED]
 In article [EMAIL PROTECTED], [EMAIL PROTECTED]
 says...
  in php,mysql_seek can move the pointer, but you have no way to know
where
  the pointer locates currently.
  i think some function should be added in the future version, like
  mysql_getPointerPosition($rs) which returns a int as the position in
  resultset. so it's would be easy to implements some pointer moving
functions
  like mysql_movenext(), mysql_moveprev,mysql_movefirst,mysql_movelast
etc.

 It's trivial to do your own tracking of where the pointer is, using
 mysql_num_rows to determine the number of rows in your result set and a
 counter to track your movement, using mysql_data_seek, in the result set.

 The manual shows n example of how to return a set in reverse order, for
 example.

 --
 Quod subigo farinam

 $email =~ s/oz$/au/o;
 A: Because it messes up the order in which people normally read text.
 Q: Why is top-posting such a bad thing?
 A: Top-posting.
 Q: What is the most annoying thing on usenet?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Database backup

2003-08-28 Thread David Robley
In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 Hi there everyone,
 
 Is there a quick way I can backup all my databases on Linux so I can download them 
 to my HD/Burn them onto CD?
 
 I've started a very large travel project and there is going to be over 100 DB's in 
 the end, each with who knows how many tables and going through PHPMyADMIN and 
 exporting 1 DB at a time is going to take forever.
 
 My Server is the Rehat Linux 8.0 with Apache and MySQL and PHP.
 
 Thanks, any help would be really appreciated (And save me alot of headaches).
 
 Chris

If you have command line access you can use mysqldump.

-- 
Quod subigo farinam

$email =~ s/oz$/au/o;
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Can anyone see why unlink isn't working?

2003-08-28 Thread J.Veenhuijsen
maybe $path$nameb is wrong
$path.$nameb???
Try echoing $path$nameb and see if is is a valid file path.

Jochem

Chris Payne wrote:
Hi there everyone,

I have image details stored in my DB, and i'm trying to remove the ones I select, but I keep getting an error saying that there is an unexpected T_Variable, can anyone see what is wrong here?  It's probably obvious, but for the life of me 

if (count($del) = 1) { 
for ($i=0;$icount($del);$i++) { 

$nameb = $del[$i];

echo $nameb;

unlink($path$nameb);

};

Thanks for any help :-)

Chris
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Ignatius Reilly
Hmmm...

You have a point; the doc is not quite clear.

Illegal YEAR values are converted to 

My understanding is that any illegal value will be first converted into
'', then into the corresponding year inside the 1901-2155 interval, ie
2000

Well, all this is quite logical. I have no quarrel with this behaviour.

Ignatius
_
- Original Message -
From: Peter Beckman [EMAIL PROTECTED]
To: Ignatius Reilly [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 4:13 PM
Subject: Re: [PHP-DB] MySQL, PHP or ghost?


 On Wed, 27 Aug 2003, Ignatius Reilly wrote:

  Read the MySQL manual.

 Hmmm, I thought I did.  6.2.2.4:

  Illegal YEAR values are converted to .

  0 value is interpreted as 2000.
  Your empty string is converted to an integer, thus 0.

 What confuses me (what I can't find) is why a quoted empty string  is
 converted to a quoted integer 0 for a YEAR type.  Based on the manual, I
 assumed an empty string is considered an Illegal YEAR and thus converted
to
 .  The empty string is NOT converted to an UNQUOTED digit 0, because
 otherwise the field would be set to  (the intended and expected
action).

You must specify it as a string '0' or '00' or it will be interpreted
as
.

 Can you point me to the correct portion of the manual that explains that?
 What you explain sounds like MySQL is working as designed, but I'm a bit
 embarrassed that I missed that in the manual, so I want to read up on it.
 Seems a bit obscure; I've been using mysql for 4+ years and have never
came
 across this.

 Thanks,
 Beckman

  - Original Message -
  From: Peter Beckman [EMAIL PROTECTED]
 
   Seems that either I don't understand mysql, or something.
  
   My table, with the non-important things removed...
  
   mysql explain plate;
  
 
+-+---+--+-+-+--
  --+
   | Field   | Type  | Null | Key | Default
|
  Extra  |
  
 
+-+---+--+-+-+--
  --+
   | pid | mediumint(8) unsigned |  | PRI | NULL
|
  auto_increment |
   | year| year(4)   | YES  | | NULL
|
  |
   [...]
  
   So my assumption is that if I insert with year= it should use the
   default.  Or at least .
  
   mysql update plate set year=NULL where pid=65;
   Query OK, 1 row affected (0.00 sec)
   Rows matched: 1  Changed: 1  Warnings: 0
  
   mysql select * from plate where pid=65;
   +-+-+--+-
   | pid | plate   | year |
   +-+-+--+-
   |  65 | DVF0343 | NULL |
   +-+-+--+-
  
   But if I do this:
  
   mysql update plate set year= where pid=65;
   Query OK, 1 row affected (0.01 sec)
   Rows matched: 1  Changed: 1  Warnings: 1
  
   mysql select * from plate where pid=65;
   +-+-+--+-
   | pid | plate   | year |
   +-+-+--+-
   |  65 | DVF0343 | 2000 |
   +-+-+--+-
  
   2000?  What?  Why?  Confused.  PHP or Mysql fault?

 --
-
 Peter Beckman  Internet
Guy
 [EMAIL PROTECTED]
http://www.purplecow.com/
 --
-


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Simple field replace...?

2003-08-28 Thread Tristan . Pretty
Hi there,
I need to take a field in my database, and remove the first 32 characters 
from each entry...
There are 100's, and I know there's gotta be an easy way...
I've looked up string replace, and it only appears to work one at a 
time...
Can anyone tell me how to make it accross the whole table...?

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



RE: [PHP-DB] Simple field replace...?

2003-08-28 Thread Snijders, Mark
I guess there is no other solution

just do it one at a time... it's no problem even if there are 100's.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: donderdag 28 augustus 2003 11:35
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Simple field replace...?


Hi there,
I need to take a field in my database, and remove the first 32 characters 
from each entry...
There are 100's, and I know there's gotta be an easy way...
I've looked up string replace, and it only appears to work one at a 
time...
Can anyone tell me how to make it accross the whole table...?

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP-DB] Simple field replace...?

2003-08-28 Thread Ignatius Reilly
hundreds of what? rows or columns?

Ignatius
_
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 11:35 AM
Subject: [PHP-DB] Simple field replace...?


 Hi there,
 I need to take a field in my database, and remove the first 32 characters
 from each entry...
 There are 100's, and I know there's gotta be an easy way...
 I've looked up string replace, and it only appears to work one at a
 time...
 Can anyone tell me how to make it accross the whole table...?

 *
 The information contained in this e-mail message is intended only for
 the personal and confidential use of the recipient(s) named above.
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is
 strictly prohibited. If you have received this communication in error,
 please notify us immediately by e-mail, and delete the original message.
 ***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Simple field replace...?

2003-08-28 Thread Jacob A. van Zanen
Try using the substring function in your sql statement

Substring('String',32);

Jack




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 28, 2003 11:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Simple field replace...?


Hi there,
I need to take a field in my database, and remove the first 32
characters 
from each entry...
There are 100's, and I know there's gotta be an easy way... I've looked
up string replace, and it only appears to work one at a 
time...
Can anyone tell me how to make it accross the whole table...?

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Simple field replace...?

2003-08-28 Thread Tristan . Pretty
Sorry, I'll specify...
I have one column, in a row of perhaps 4 fields.
I want to remove the first 32 characters from onlt one field

EG:
My DB:

namedateurl ip
bob 1/2/99  http:// 1.1.1.1.
sue 4/6/01  http:// 2.2.2.2

If I wanted to remove just the http bit and leave ://
I'd have to remove the first 4 characters from all the 'url' column.
this is what I wanna do, jsut 100+ times over. but the first 32 
characters.





Ignatius Reilly [EMAIL PROTECTED]
28/08/2003 11:04

 
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
cc: 
Subject:Re: [PHP-DB] Simple field replace...?


hundreds of what? rows or columns?

Ignatius
_
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 11:35 AM
Subject: [PHP-DB] Simple field replace...?


 Hi there,
 I need to take a field in my database, and remove the first 32 
characters
 from each entry...
 There are 100's, and I know there's gotta be an easy way...
 I've looked up string replace, and it only appears to work one at a
 time...
 Can anyone tell me how to make it accross the whole table...?

 *
 The information contained in this e-mail message is intended only for
 the personal and confidential use of the recipient(s) named above.
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is
 strictly prohibited. If you have received this communication in error,
 please notify us immediately by e-mail, and delete the original message.
 ***







*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP-DB] Simple field replace...?

2003-08-28 Thread Ignatius Reilly
Then a simple substring will do:

UPDATE mytable
SET url = SUBSTRING( url FROM 5 )

btw your date column looks pretty awful.

HTH
Ignatius
_
- Original Message -
From: [EMAIL PROTECTED]
To: Ignatius Reilly [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 12:06 PM
Subject: Re: [PHP-DB] Simple field replace...?


 Sorry, I'll specify...
 I have one column, in a row of perhaps 4 fields.
 I want to remove the first 32 characters from onlt one field

 EG:
 My DB:

 namedateurl ip
 bob 1/2/99  http:// 1.1.1.1.
 sue 4/6/01  http:// 2.2.2.2

 If I wanted to remove just the http bit and leave ://
 I'd have to remove the first 4 characters from all the 'url' column.
 this is what I wanna do, jsut 100+ times over. but the first 32
 characters.





 Ignatius Reilly [EMAIL PROTECTED]
 28/08/2003 11:04


 To: [EMAIL PROTECTED], [EMAIL PROTECTED]
 cc:
 Subject:Re: [PHP-DB] Simple field replace...?


 hundreds of what? rows or columns?

 Ignatius
 _
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 28, 2003 11:35 AM
 Subject: [PHP-DB] Simple field replace...?


  Hi there,
  I need to take a field in my database, and remove the first 32
 characters
  from each entry...
  There are 100's, and I know there's gotta be an easy way...
  I've looked up string replace, and it only appears to work one at a
  time...
  Can anyone tell me how to make it accross the whole table...?
 
  *
  The information contained in this e-mail message is intended only for
  the personal and confidential use of the recipient(s) named above.
  If the reader of this message is not the intended recipient or an agent
  responsible for delivering it to the intended recipient, you are hereby
  notified that you have received this document in error and that any
  review, dissemination, distribution, or copying of this message is
  strictly prohibited. If you have received this communication in error,
  please notify us immediately by e-mail, and delete the original message.
  ***
 
 





 *
 The information contained in this e-mail message is intended only for
 the personal and confidential use of the recipient(s) named above.
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is
 strictly prohibited. If you have received this communication in error,
 please notify us immediately by e-mail, and delete the original message.
 ***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Simple field replace...?

2003-08-28 Thread Griffiths, Daniel
like Jacob said, use the string functions of mysql in the actual SQL statment, not php.

http://www.mysql.com/doc/en/String_functions.html

UPDATE TABLE SET FIELD = SUBSTRING(FIELD,33) 

33 as you will want to delete the 32'nd char



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 28 August 2003 11:07
To: Ignatius Reilly
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Simple field replace...?


Sorry, I'll specify...
I have one column, in a row of perhaps 4 fields.
I want to remove the first 32 characters from onlt one field

EG:
My DB:

namedateurl ip
bob 1/2/99  http:// 1.1.1.1.
sue 4/6/01  http:// 2.2.2.2

If I wanted to remove just the http bit and leave ://
I'd have to remove the first 4 characters from all the 'url' column.
this is what I wanna do, jsut 100+ times over. but the first 32 
characters.





Ignatius Reilly [EMAIL PROTECTED]
28/08/2003 11:04

 
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
cc: 
Subject:Re: [PHP-DB] Simple field replace...?


hundreds of what? rows or columns?

Ignatius
_
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 11:35 AM
Subject: [PHP-DB] Simple field replace...?


 Hi there,
 I need to take a field in my database, and remove the first 32 
characters
 from each entry...
 There are 100's, and I know there's gotta be an easy way...
 I've looked up string replace, and it only appears to work one at a
 time...
 Can anyone tell me how to make it accross the whole table...?

 *
 The information contained in this e-mail message is intended only for
 the personal and confidential use of the recipient(s) named above.
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is
 strictly prohibited. If you have received this communication in error,
 please notify us immediately by e-mail, and delete the original message.
 ***







*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] looking for a .exe file

2003-08-28 Thread blond al
I need a php editor file
thanks for help!

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] looking for a .exe file

2003-08-28 Thread CPT John W. Holmes
From: blond al [EMAIL PROTECTED]

 I need a php editor file
 thanks for help!

file:///WINNT/system32/notepad.exe

You're welcome.

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Simple field replace...?

2003-08-28 Thread Tristan . Pretty
Was just an examle date column ;-)

Anyhoo, jsut a note to say, it's sorted..(I did the mass replace by hand 
:-( but at least it's done...
I've also sorted anotehr prob too, so all in all, a productive morning...
I jsut wish I could remember all this stuff for next time!






Ignatius Reilly [EMAIL PROTECTED]
28/08/2003 11:29

 
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: [PHP-DB] Simple field replace...?


Then a simple substring will do:

UPDATE mytable
SET url = SUBSTRING( url FROM 5 )

btw your date column looks pretty awful.

HTH
Ignatius
_
- Original Message -
From: [EMAIL PROTECTED]
To: Ignatius Reilly [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 12:06 PM
Subject: Re: [PHP-DB] Simple field replace...?


 Sorry, I'll specify...
 I have one column, in a row of perhaps 4 fields.
 I want to remove the first 32 characters from onlt one field

 EG:
 My DB:

 namedateurl ip
 bob 1/2/99  http:// 1.1.1.1.
 sue 4/6/01  http:// 2.2.2.2

 If I wanted to remove just the http bit and leave ://
 I'd have to remove the first 4 characters from all the 'url' column.
 this is what I wanna do, jsut 100+ times over. but the first 32
 characters.





 Ignatius Reilly [EMAIL PROTECTED]
 28/08/2003 11:04


 To: [EMAIL PROTECTED], 
[EMAIL PROTECTED]
 cc:
 Subject:Re: [PHP-DB] Simple field replace...?


 hundreds of what? rows or columns?

 Ignatius
 _
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 28, 2003 11:35 AM
 Subject: [PHP-DB] Simple field replace...?


  Hi there,
  I need to take a field in my database, and remove the first 32
 characters
  from each entry...
  There are 100's, and I know there's gotta be an easy way...
  I've looked up string replace, and it only appears to work one at a
  time...
  Can anyone tell me how to make it accross the whole table...?
 
  *
  The information contained in this e-mail message is intended only for
  the personal and confidential use of the recipient(s) named above.
  If the reader of this message is not the intended recipient or an 
agent
  responsible for delivering it to the intended recipient, you are 
hereby
  notified that you have received this document in error and that any
  review, dissemination, distribution, or copying of this message is
  strictly prohibited. If you have received this communication in error,
  please notify us immediately by e-mail, and delete the original 
message.
  
***
 
 





 *
 The information contained in this e-mail message is intended only for
 the personal and confidential use of the recipient(s) named above.
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is
 strictly prohibited. If you have received this communication in error,
 please notify us immediately by e-mail, and delete the original message.
 ***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP-DB] Populating an array from mysql db

2003-08-28 Thread mike karthauser
I have a course booking system that allows the client to add courses and
then specify how long they run for. The admin system I have built allows the
client to add up to 30 dates for each instance of the course and these are
adding to a database row in the form date1, date2, date3, daten etc.

What I am trying to achieve now is to extract this data into an array so I
can count how many dates have been added and to display the dates.

If the course runs for eg. 2 days - values of date1 and date2 would be
populated as date1=2003-09-01, date2=2003-09-02 - all other dates would be
default to -00-00 and I wish to ignore these.

I'm trying to work out how to set up a loop to extract positive dates from
my db so I end up with

$bookdate[0] = '2003-09-01';
$bookdate[1] = '2003-09-02'; etc

Can anyone provide me with some help in this extraction?

Thanks in advance.

-- 
Mike Karthauser 
Managing Director - Brightstorm Ltd

Email[EMAIL PROTECTED]
Web  http://www.brightstorm.co.uk
Tel  0117 9426653 (office)
   07939 252144 (mobile)

SnailmailUnit 8, 14 King Square,
   Bristol BS2 8JJ

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread jeffrey_n_Dyke

I'd worry about the empty dates after. and use something like.

$qry = select date1, date2 from table;
$result = mysql_query($qry) or die(mysql_error());
while ($rs = mysql_fetch_row($result)) {
//this array could be built a number of ways, one is
  $bookdate[] = array($rs[0],$rs[1]);
}

if i've not misunderstood, that should work
hth
jeff



   
 
  mike karthauser  
 
  [EMAIL PROTECTED]To:   [EMAIL PROTECTED]  
   
  m.co.uk cc: 
 
   Subject:  [PHP-DB] Populating an array 
from mysql db 
  08/28/2003 08:01 
 
  AM   
 
   
 
   
 




I have a course booking system that allows the client to add courses and
then specify how long they run for. The admin system I have built allows
the
client to add up to 30 dates for each instance of the course and these are
adding to a database row in the form date1, date2, date3, daten etc.

What I am trying to achieve now is to extract this data into an array so I
can count how many dates have been added and to display the dates.

If the course runs for eg. 2 days - values of date1 and date2 would be
populated as date1=2003-09-01, date2=2003-09-02 - all other dates would be
default to -00-00 and I wish to ignore these.

I'm trying to work out how to set up a loop to extract positive dates from
my db so I end up with

$bookdate[0] = '2003-09-01';
$bookdate[1] = '2003-09-02'; etc

Can anyone provide me with some help in this extraction?

Thanks in advance.

--
Mike Karthauser
Managing Director - Brightstorm Ltd

Email[EMAIL PROTECTED]
Web  http://www.brightstorm.co.uk
Tel  0117 9426653 (office)
   07939 252144 (mobile)

SnailmailUnit 8, 14 King Square,
   Bristol BS2 8JJ

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Stange PHP bug?

2003-08-28 Thread Chris Payne
Hi there,

This is the strange thing, it works on the other PHP sites i've done for
him, and this new one uses exactly the same menu/display engine as the other
sites I wrote for him, so there shouldn't be any problems in THEORY, it's
just the most strange thing i've ever seen.  I've told him if all else fails
reinstall windows, i've got him downloading Mozilla to see as if that works
we then KNOW it's his explorer, though he won't see the CSS Shadows etc 
with Mozilla, atleast I can breathe easy and know for SURE it isn't my
coding (Though as I said before, PHP and MySQL aren't selective when they
run and when they don't, they either work or you get horrible error messages
:-)

Chris

 Chris,

 Like you say doesnt seem to be php, I'd be suspecting XP's firewall
settings on his dial up connection, can you try a different connection, does
this happen with all php sites? Not much help I know!

 Dan

 -Original Message-
 From: Chris Payne [mailto:[EMAIL PROTECTED]
 Sent: 27 August 2003 22:20
 To: php
 Subject: [PHP-DB] Stange PHP bug?


 Hi There,

 I'm developing a website for my boss, and it works PERFECTLY for me and
everyone else i've shown it too, but when my boss goes to the page anything
that is PHP related just doesn't show up on his machine.

 He is using Windows XP with Explorer 6, just like my development machine,
but no PHP or Databases show up, it's just either the background images OR
after an hour he gets a timeout - but he's the only person who has this
problem.  Has anyone seen this before?  I'm sure it's not a PHP/MySQL error
as a script either works or it doesn't, could it be his installation of
Explorer?  He's on dialup in the UK, but my friend from the UK is on
broadband with the same setup and it works fine for him.

 Sorry this isn't an actual PHP/MySQL technical question, but I thought
that somebody might be able to back me up as I think it's his browser.

 Any thought?

 Chris


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Martin Marques
El Mié 27 Ago 2003 11:34, Ignatius Reilly escribió:
 Hmmm...

 You have a point; the doc is not quite clear.

 Illegal YEAR values are converted to 

 My understanding is that any illegal value will be first converted into
 '', then into the corresponding year inside the 1901-2155 interval, ie
 2000

 Well, all this is quite logical. I have no quarrel with this behaviour.

Not at all. This is totally ilogical.
Wrong date values should give error messages.

See what happens when you try to bend a bad input value:

http://archives.postgresql.org/pgsql-general/2003-07/msg00599.php

Please don't use MySQL in monetary aplications!!

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Stange PHP bug?

2003-08-28 Thread Chris Payne
Hi there,

No that's the strange thing.  I have written several websites for him which
all work fine, this new website is in development and works fine on the 2
PC's here and 3 friends in the UK it's only on HIS machine that this doesn't
work.  And that's what's odd, I am using the same PHP display engine for the
new website as the other websites which work fine.

He sent me a screengrab with what happens on the menu page on the left, it
tries to open the page for about an hour, then says there is an error and it
can't be opened - but it can be here on both machines (Both my dev and my
wifes) and is fine on 3 PC's in the UK (I'm in Orlando, FL) so I can't see
it being anything wrong with the code, but then why would it not work for
him when the other sites which use the same PHP menu code do?

Oh and he's using IE 6 the same as me on Windows XP - the only difference is
I use XP Pro for dev work.

Very odd.

Chris

 Is is just your site.  does he have problems with other internet/php
sites?
 i.e www.php.net?

 jeff



   Chris Payne
   [EMAIL PROTECTED]To:   php
[EMAIL PROTECTED]
   ene.com cc:
Subject:  Re: [PHP-DB]
Stange PHP bug?
   08/28/2003 08:32
   AM






 Hi there,

 This is the strange thing, it works on the other PHP sites i've done for
 him, and this new one uses exactly the same menu/display engine as the
 other
 sites I wrote for him, so there shouldn't be any problems in THEORY, it's
 just the most strange thing i've ever seen.  I've told him if all else
 fails
 reinstall windows, i've got him downloading Mozilla to see as if that
works
 we then KNOW it's his explorer, though he won't see the CSS Shadows etc
 
 with Mozilla, atleast I can breathe easy and know for SURE it isn't my
 coding (Though as I said before, PHP and MySQL aren't selective when they
 run and when they don't, they either work or you get horrible error
 messages
 :-)

 Chris

  Chris,
 
  Like you say doesnt seem to be php, I'd be suspecting XP's firewall
 settings on his dial up connection, can you try a different connection,
 does
 this happen with all php sites? Not much help I know!
 
  Dan
 
  -Original Message-
  From: Chris Payne [mailto:[EMAIL PROTECTED]
  Sent: 27 August 2003 22:20
  To: php
  Subject: [PHP-DB] Stange PHP bug?
 
 
  Hi There,
 
  I'm developing a website for my boss, and it works PERFECTLY for me and
 everyone else i've shown it too, but when my boss goes to the page
anything
 that is PHP related just doesn't show up on his machine.
 
  He is using Windows XP with Explorer 6, just like my development
machine,
 but no PHP or Databases show up, it's just either the background images OR
 after an hour he gets a timeout - but he's the only person who has this
 problem.  Has anyone seen this before?  I'm sure it's not a PHP/MySQL
error
 as a script either works or it doesn't, could it be his installation of
 Explorer?  He's on dialup in the UK, but my friend from the UK is on
 broadband with the same setup and it works fine for him.
 
  Sorry this isn't an actual PHP/MySQL technical question, but I thought
 that somebody might be able to back me up as I think it's his browser.
 
  Any thought?
 
  Chris
 

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread CPT John W. Holmes
From: mike karthauser [EMAIL PROTECTED]


 I have a course booking system that allows the client to add courses and
 then specify how long they run for. The admin system I have built allows
the
 client to add up to 30 dates for each instance of the course and these are
 adding to a database row in the form date1, date2, date3, daten etc.

 What I am trying to achieve now is to extract this data into an array so I
 can count how many dates have been added and to display the dates.

 If the course runs for eg. 2 days - values of date1 and date2 would be
 populated as date1=2003-09-01, date2=2003-09-02 - all other dates would be
 default to -00-00 and I wish to ignore these.

 I'm trying to work out how to set up a loop to extract positive dates from
 my db so I end up with

 $bookdate[0] = '2003-09-01';
 $bookdate[1] = '2003-09-02'; etc

 Can anyone provide me with some help in this extraction?

With just a short comment on what a horrible, horrible database schema this
is, you should be able to use

if($date_from_db != '-00-00')
{ $bookdate[] = $date_from_db; }

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Thanks

2003-08-28 Thread Diana Cassady
Hi. Thanks for all your help with the referer and the and, or ||  
subject.

I realize that neither of my questions were database related. I've 
looked again at the email lists offered on the PHP site and see now 
that there is a general user list. I had somehow missed that before and 
felt I had to choose only from Internationalization and the other 
options that also did not apply to me.

I appreciate your help in assisting with these two simple questions. I 
do try to find the answers in the manual before asking on the list. I 
haven't read it cover to cover for a couple years, now (I don't often 
program in PHP - I usually use Lasso), but did review the section on 
control structures before asking about the II and , and read the 
section on variables and constants before asking about the referer. I 
had searched for referer online, but was spelling it referrer, 
instead, which I thought was the proper spelling. Even when I do spell 
it referer, I don't come up with what you have provided, but instead 
session.referer_check which doesn't seem to be the same thing.

Your assistance has been very helpful and I really appreciate it. I 
could never have found what I needed in the manual. I'm sorry to have 
gotten off the subject of databases and will ask future general 
questions where they belong - on the general questions list.

Thanks again for your help.

Diana   
[EMAIL PROTECTED] Will Work for Chocolate
http://www.vivaladata.com   (and its worth every byte!)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Logic Help...

2003-08-28 Thread NIPP, SCOTT V (SBCSI)
Thanks for all the help.  I was finally able to get this working
properly by viewing the variable data as suggested.  I then ran into another
minor issue with session variables keeping their old values on a second pass
through the application, but I resolved this by unregistering these
variables before sending the user back through the application.  One strange
thing I noticed was that you can register multiple variables with a single
session_register, but you have to unregister only a single variable at a
time.  Anyone know anything more about this?  Am I doing something wrong, or
is it this way by design?  Thanks.

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 4:10 PM
To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Logic Help...


From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]


 Thanks for the feedback.  This seems to have helped, but something
 is still not working with the logic.  Here is the updated code:

 ?php
   while($cntr != 0) {
 $cntr--;
 if (($shell[$cntr] == ) || ($grp[$cntr] == )) {
   echo p align=\center\font color=\#99\
 size=\4\Sorry, but your request was not filled out completely.  Please
 resubmit this request ensuring that you have selected a Primary Group and
 Default Shell./font/p;
   echo p align=\center\font color=\#99\ size=\4\Please
 follow this a
 href=\http://ldsa.sbcld.sbc.com/DW/NewUser/newuser.php\;link/a to
return
 to the beginning of the request process./font/p;
   exit;
 }
   }
 ?

 Now, the test conditions never seem to enter into this portion of
 code.  I am unable to figure out why at this point.  Thanks again for the
 help.

Okay... let's do some basic debugging now. What does print_r($shell) and
print_r($grp) display? Are there any entries that are equal to an empty
string?

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Ignatius Reilly
Well, it IS logical provided one is aware of the rules of the game, meaning,
as you rightly point out, that MySQL does not reject SQL statements for
incorrect values, but attempts at converting them at any price. I have no
clue whether it is or not a shortcoming of the implementation (I do not know
what SQL-92 says about this). Therefore data validation should be done
outside MySQL.

Ignatius
_
- Original Message -
From: Martin Marques [EMAIL PROTECTED]
To: Ignatius Reilly [EMAIL PROTECTED]; Peter Beckman
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 2:36 PM
Subject: Re: [PHP-DB] MySQL, PHP or ghost?


El Mié 27 Ago 2003 11:34, Ignatius Reilly escribió:
 Hmmm...

 You have a point; the doc is not quite clear.

 Illegal YEAR values are converted to 

 My understanding is that any illegal value will be first converted into
 '', then into the corresponding year inside the 1901-2155 interval, ie
 2000

 Well, all this is quite logical. I have no quarrel with this behaviour.

Not at all. This is totally ilogical.
Wrong date values should give error messages.

See what happens when you try to bend a bad input value:

http://archives.postgresql.org/pgsql-general/2003-07/msg00599.php

Please don't use MySQL in monetary aplications!!

--
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] i am so Lost with Php

2003-08-28 Thread Sebastian Haag
Marion,

marionh said:
 I bought my own domain and have Php on it and Myslq..i have no idea what
 these are or how to use the php to set up a guestbook, etc..Is there any
 sites that would tell me how step by step..My host would do it for a fee
 and
 I want to do it myself
 thanks
 marion

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



Take a look at these manuals. They don't tell you how to set up your own
guestbook but they give you all the information you need.

http://www.mysql.com/documentation/mysql/bychapter/index.html

http://de3.php.net/manual/en/

-- 

Once a problem is defined - it is half way solved. (Henry Ford)

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread mike karthauser
on 28/8/03 1:09 pm, [EMAIL PROTECTED] at [EMAIL PROTECTED]
wrote:

 
 I'd worry about the empty dates after. and use something like.
 
 $qry = select date1, date2 from table;
 $result = mysql_query($qry) or die(mysql_error());
 while ($rs = mysql_fetch_row($result)) {
 //this array could be built a number of ways, one is
 $bookdate[] = array($rs[0],$rs[1]);
 }
 
 if i've not misunderstood, that should work

Thanks for this - I ended up rehashing my query to this:

?
$result = mysql_query(SELECT * FROM dates WHERE bookcode = '$bookcode'
ORDER BY date1,$db);


// loop to populate array

$myrow = mysql_fetch_array($result);

$i = 1;
while ($i = '30') {

if ($myrow['date'.$i]  '-00-00')
{
$bookdate[]=$myrow['date'.$i];
}


$i++;  /* the printed value would be
$i before the increment
(post-increment) */
}

//end loop

$result2 = count ($bookdate);

if ($result2 == 0)
  {
echo pThis course booking runs for 0 days/pp;
 }
  else if ($result2 == 1)
  {
echo pThis course booking runs for b1/b day on the following
date:/Pp;
  }
  else {
echo pThis course booking runs for b$result2/b days on the
following dates: /pp;
  }

function print_dates ($bookdate)
{foreach ($bookdate as $display_date) {
$date = $display_date;
$dv[0] = substr($date, 8, 2);
$dv[1] = substr($date, 5, 2);
$dv[2] = substr($date, 0, 4);
$display_date = implode (-,$dv) ;

print(span class=\divider\$display_date/spanbr);
}
} 

print_dates($bookdate);

?

Which does what I need. The tricky bit was the //loop

cheers
-- 
Mike Karthauser 
Managing Director - Brightstorm Ltd

Email[EMAIL PROTECTED]
Web  http://www.brightstorm.co.uk
Tel  0117 9426653 (office)
   07939 252144 (mobile)

SnailmailUnit 8, 14 King Square,
   Bristol BS2 8JJ

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Stange PHP bug?

2003-08-28 Thread Chris Payne
Hi there,

Well I mean a new virtual website yes, all permissions are enabled for all
users with PHP/MySQL enabled (Oh and it's Apache 2.0.40).

I checked and all permissions are there, it parses the PHP files and outputs
the HTML for standard HTML pages for him, just not any PHP.  it doesn't say
access denied and his IP is dynamic as he uses dialup in the UK.

The thing is, it works for everyone else, I told him to try Mozilla to see
if that still causes him problems, if it works with that then I can assume
it's his IE settings, if not i'll have to investigate it further.

I appreciate your help very much though, as sometimes the most annoying
problems have the simplest solution (I'm an annoying problem but the only
solution to me is to shoot me LOL :-)

Chris

 Chris,

 Wild guess here, but could this problem possibly be caused by your web
 server configuration? You didn't mention what type of server you are
using,
 but with Apache, there are a few ways that you can allow/deny access to
 entire directories/sites for certain users. Is is possible that your boss
 has not been given access to the new site in the web server configuration?
 Are you using .htaccess files or virtual hosts that may have been set up
 incorrectly or haven't been updated to permit him access to the new site?

 BTW, I'm going on the assumption that when you say new site you mean a
new
 directory on a server with some new content and some pages using content
 you're re-using from other sites (as you've previously mentioned).

 Again, just a shot in the dark here.

 HTH,
 Rich

  -Original Message-
  From: Chris Payne [mailto:[EMAIL PROTECTED]
  Sent: Thursday, August 28, 2003 8:39 AM
  To: php
  Subject: Re: [PHP-DB] Stange PHP bug?
 
 
  Hi there,
 
  No that's the strange thing.  I have written several websites
  for him which
  all work fine, this new website is in development and works
  fine on the 2
  PC's here and 3 friends in the UK it's only on HIS machine
  that this doesn't
  work.  And that's what's odd, I am using the same PHP display
  engine for the
  new website as the other websites which work fine.
 
  He sent me a screengrab with what happens on the menu page on
  the left, it
  tries to open the page for about an hour, then says there is
  an error and it
  can't be opened - but it can be here on both machines (Both
  my dev and my
  wifes) and is fine on 3 PC's in the UK (I'm in Orlando, FL)
  so I can't see
  it being anything wrong with the code, but then why would it
  not work for
  him when the other sites which use the same PHP menu code do?
 
  Oh and he's using IE 6 the same as me on Windows XP - the
  only difference is
  I use XP Pro for dev work.
 
  Very odd.
 
  Chris
 
   Is is just your site.  does he have problems with other internet/php
  sites?
   i.e www.php.net?
  
   jeff
  
  
  
 Chris Payne
 [EMAIL PROTECTED]To:   php
  [EMAIL PROTECTED]
 ene.com cc:
  Subject:
  Re: [PHP-DB]
  Stange PHP bug?
 08/28/2003 08:32
 AM
  
  
  
  
  
  
   Hi there,
  
   This is the strange thing, it works on the other PHP sites
  i've done for
   him, and this new one uses exactly the same menu/display
  engine as the
   other
   sites I wrote for him, so there shouldn't be any problems
  in THEORY, it's
   just the most strange thing i've ever seen.  I've told him
  if all else
   fails
   reinstall windows, i've got him downloading Mozilla to see
  as if that
  works
   we then KNOW it's his explorer, though he won't see the CSS
  Shadows etc
   
   with Mozilla, atleast I can breathe easy and know for SURE
  it isn't my
   coding (Though as I said before, PHP and MySQL aren't
  selective when they
   run and when they don't, they either work or you get horrible error
   messages
   :-)
  
   Chris
  
Chris,
   
Like you say doesnt seem to be php, I'd be suspecting
  XP's firewall
   settings on his dial up connection, can you try a different
  connection,
   does
   this happen with all php sites? Not much help I know!
   
Dan
   
-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED]
Sent: 27 August 2003 22:20
To: php
Subject: [PHP-DB] Stange PHP bug?
   
   
Hi There,
   
I'm developing a website for my boss, and it works
  PERFECTLY for me and
   everyone else i've shown it too, but when my boss goes to the page
  anything
   that is PHP related just doesn't show up on his machine.
   
He is using Windows XP with Explorer 6, just like my development
  machine,
   but no PHP or Databases show up, it's just either the
  background images OR
   after an hour he gets a timeout - but he's the only person
  who has this
   problem.  Has anyone seen this before?  I'm sure it's not a
  PHP/MySQL
  error
   as a script either works or it doesn't, 

Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread CPT John W. Holmes
From: mike karthauser [EMAIL PROTECTED]

 Thanks for this - I ended up rehashing my query to this:

 ?
 $result = mysql_query(SELECT * FROM dates WHERE bookcode = '$bookcode'
 ORDER BY date1,$db);


 // loop to populate array

 $myrow = mysql_fetch_array($result);

 $i = 1;
 while ($i = '30') {

 if ($myrow['date'.$i]  '-00-00')

You're making PHP do some extra work here. You're testing to see if one
string is greater than another... how can strings be greater than or less
than? Why don't you just check for $myrow['date'.$i] != '-00-00' ??

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] SESSION SID Question

2003-08-28 Thread dpgirago
Howdy Listers, 

Can someone explain to me the mechanism by which SID acquires a value?

For example, 

$FOO = SID;
echo $FOO;

produces something like PHPSESSID=ade4055eef947f1a00cdb280470e859b when 
IE is first opened and the page is loaded,
whereas reloading of the page produces an empty string when $FOO is 
echo'd. Seems to have something to do with creating a 
browser instance.

Thanks,
 
David

Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread mike karthauser
on 28/8/03 5:00 pm, CPT John W. Holmes at [EMAIL PROTECTED] wrote:

 Thanks for this - I ended up rehashing my query to this:
 
 ?
 $result = mysql_query(SELECT * FROM dates WHERE bookcode = '$bookcode'
 ORDER BY date1,$db);
 
 
 // loop to populate array
 
 $myrow = mysql_fetch_array($result);
 
 $i = 1;
 while ($i = '30') {
 
 if ($myrow['date'.$i]  '-00-00')
 
 You're making PHP do some extra work here. You're testing to see if one
 string is greater than another... how can strings be greater than or less
 than? Why don't you just check for $myrow['date'.$i] != '-00-00' ??

Thanks. I'll make your change.

Ta. 

-- 
Mike Karthauser 
Managing Director - Brightstorm Ltd

Email[EMAIL PROTECTED]
Web  http://www.brightstorm.co.uk
Tel  0117 9426653 (office)
   07939 252144 (mobile)

SnailmailUnit 8, 14 King Square,
   Bristol BS2 8JJ

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread Ford, Mike [LSS]
On 28 August 2003 17:25, mike karthauser wrote:

 on 28/8/03 5:00 pm, CPT John W. Holmes at
 [EMAIL PROTECTED] wrote:
 
   Thanks for this - I ended up rehashing my query to this:
   
   ?
   $result = mysql_query(SELECT * FROM dates WHERE bookcode =
   '$bookcode' ORDER BY date1,$db); 
   
   
   // loop to populate array
   
   $myrow = mysql_fetch_array($result);
   
   $i = 1;
   while ($i = '30') {
   
   if ($myrow['date'.$i]  '-00-00')
  
  You're making PHP do some extra work here. You're testing to see if
  one string is greater than another... how can strings be greater
  than or less than? Why don't you just check for $myrow['date'.$i]
  != '-00-00' ?? 
 
 Thanks. I'll make your change.

While you're about it, remove the quotes from

while ($i = '30') {

as well -- saves a conversion from string to integer each time round the loop (well, 
unless PHP optimises it out of the loop, but why take the chance?!).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] SESSION SID Question

2003-08-28 Thread dpgirago
Howdy Listers, 

Can someone explain to me the mechanism by which SID acquires a value?

For example, 

$FOO = SID;
echo $FOO;

produces something like PHPSESSID=ade4055eef947f1a00cdb280470e859b when 
IE is first opened and the page is loaded,
whereas reloading of the page produces an empty string when $FOO is 
echo'd. Seems to have something to do with creating a 
browser instance.

Thanks,
 
David

Re: [PHP-DB] SESSION SID Question

2003-08-28 Thread CPT John W. Holmes
From: [EMAIL PROTECTED]
 Can someone explain to me the mechanism by which SID acquires a value?

 For example,

 $FOO = SID;
 echo $FOO;

 produces something like PHPSESSID=ade4055eef947f1a00cdb280470e859b when
 IE is first opened and the page is loaded,
 whereas reloading of the page produces an empty string when $FOO is
 echo'd. Seems to have something to do with creating a
 browser instance.

SID is used to pass the session ID around in URLs. It gives you the text
formatted so that you can just stick it into a URL.

Normally cookies are used to hold the session id and pass it from page to
page. If for some reason PHP cannot set the session cookie (or it's not
present), then PHP creates SID.

This means you can include SID in all of your URLs and when the cookie is
there, it'll be empty and nothing will appear in your URL (rightly so), but
if the cookie is not there, SID will place the session ID in your URL so
that your sessions persist.

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Problemas con ingreso y modificacion de datos en formularios con PHP y MySQL.

2003-08-28 Thread José Luis Palacios Vergara
Tengo un problema con algunos programas en php, estoy usando 4 frames 3 de
ellos son para ingreso de datos, el frame superior es utilizado para
ingresar y verificar información que es validada contra una bases de datos
(actualmente solo muestra información existente), en el frame central
muestra la información dependiendo si lo que se ingresó  en el frame
superior existe; el fram inferior es utilizado para navegar a través de los
registros. Me gustaría saber si alguien puede revisar y hacer para re
utilizar el mismo código para ingresar información si es que ésta no existe
y dar opciones de grabación en el frame inferior (Grabar /Modificar/ Salir).
Para todo esto se ha utilizado programación PHP y MySQL, como adición  a
esto, si uno presiona (?) aparece una ventana donde despliega los datos
existentes para realizar una busqueda de los datos y devuelve el dato
seleccionado (muestra 2 columnas que pueden ser ordenada indistintamente).
Si a alguien le sirve algo de lo que ahi esta por favor uselo y si tiene
algun aporte respecto de lo que pregunto sería muy bueno. Atachados van los
programas y la base de datos.

Gracias

José Luis


begin 666 empresa01.zip
M4$L#!!0([EMAIL PROTECTED]'[EMAIL PROTECTED]F5S83 Q+G-Q;.1=
MZ8[-K;^;R#O02 :QMHE[4O,[EMAIL PROTECTED])+Q;8D*I143A2'KLGEP#7H)V.\ \
M49[';W3/.:266FRW[P:T;I .591*4IWU.PN9O[#J7^U/Y;/-[8?W=RS_].YW
MYJW'Q[]!?YEVP\?[_[*/,=9A[*]8*5X2,L?SZ[OH?UQ]O_LINWOU^_/Q
MVG'QZF?_Q7_PN^W-[1\WMPS^/K[Y\)X%*WB_^SCW?7[U]WKW]X],.COA73
MX_Z,_8EN^M_O+UA'^]N/[VZ^W1[P_[YX9;=T=SC5V_?W/QR_;QW3I#X]R
MK1K6\74IF-PP\;-LNY;].ESU*]PUTX)WPEXSG6%/'C'VJ_YT]RO[X_KVU7]
MWSY)G[):=:SNRY*]OOGG]:W=^SQXPN\KO[P[A?SJM/ED?.MZU]]N)W=WOO*
M]=GUV[WTZ7AUV[]Z=TOK\SE;][?/8F?3AX]F9O/KV^?CW=S0V_?+?VYM7=
MA]O#:X=+\'JZ2-_\!BPTS_/.W6MX\/7'-V_?7L_NYIRYV^;#^P^S2\[*+B
M[WO;V]^FZX/OD7U]Z]X;OY_KLP[M/[Z_O1ZCBSWLK?TOW_6%N+)R]82
MIX^LNZJ$?]_4NVO+)R;B4=M?/-^]_8:]_KXFYK%NA.R;K3AW(,#WAXD ^
M+PZD[V*0K8NYY%R,0G(QBL#%R.+B9,7EET7!\RX.#UQ4C(TNFIVS'RUZT
M3WY,HCAU(L?Q?KQ@/_)JTQ50F2EPP^R0S=L57]BQ^QD/19KR69E9$-(W
M[=#RNI.\4,?'KH__Q3]__BQ'W@)?KY4NA LXSH7E2Q9+ICN-:[EMAIL PROTECTED]3I7
MK.5=)TJAV3/2W'):S JK(3GJ_[EMAIL PROTECTED],?\*'!=QPD'3NQ$Q\HNYZL+
M!OQ87XHH/[EMAIL PROTECTED]RYIKR6=7T^$.OL#:7NXY\U*ZEQWF_,[EMAIL PROTECTED]/-]U
M$X?F7LIRHT7.MD#,O6 O1;F7HJ+'Z JXH%A6]K5H6;E:$/U/'2-+,`T`
M*:[EMAIL PROTECTED]/;[EMAIL PROTECTED].WU**V/4]AY1BS37\RUFO
M]ST'G4!%JWA12*6)WQ773Q#JTO/N]KV6GX!$ITR=GP6N8!CN]Z#YX?:R@
MA7([EMAIL PROTECTED])P(IZ)W0KE4!77[EMAIL PROTECTED]%HP4U4.X,*Z(TBB*?
MYLIMDS46O[4W;[EMAIL PROTECTED]:[H#![EMAIL PROTECTED];(D%VU2M*
M[ _(([EMAIL PROTECTED]Y`*EUC3.QPZ'9^0+!0?83-R+(@S#Z=;85YS;\+5$
MPP=NITO44KH'?-A :`UD;E9BVXZW[EMAIL PROTECTED](COIXRCX0DK-L*TMQ0'I
M]T'_J!EJ4[EMAIL PROTECTED]([EMAIL PROTECTED]/,L0'Q _?4!$.EJ38U$NBJ#?]NI29S'D.
MCKCA'1@:O$SHG^(]$G@)A$0):B5V HS0D-]YX-HV''00O$HV,;PR'Z)
MA*(T=9V !'\#TDP^5;0-_\Q9IG1G+-KAF?W\U$)HSKPX]CTO\2UQ`9FP+6 4
M-AES!SS2KS7/TRC80+1OIR\(8M0![ [EMAIL PROTECTED])4LD%\P[XP9
M?NWQ7SKWG-M;+#8K@@=P^KH/VBB%L1N I2 T0QK1\P,#X8)/*X`J(I
M8FY 7+##O74B2A*C?EJ 42M!\GN]AB/UYIO.2%0K0HPA5NP1F6AP!Y=*OY3
M+VNP2Z6J4$7I!X0H:$SL(3'6 [EMAIL PROTECTED]40T1/8I4XV8,00_X'D'5P_
M,;[9CO?F2.(FB8N?C7LNN*Z!#\/MHH[A#Y2R#^E[EMAIL PROTECTED]@:W!:
M#YH+J9@^A'P=N#!;[EMAIL PROTECTED]:THFU8L@/1''D!X.7PX=\B0*'-;)5S6Q
MAX_?P1WP/#' 5?P\.67@G2P2M67XIG(PJCD0LXK:.P$,% H$-4*%.S
MPF=XW1I#3/@='%Z778IE!1(8UP$#?2N5X$PE9S4'@H509YAEFCT)O;(TG
MNX2 6D]ZM:I7WHRA5F7X#HQ/B7.Q.2N\: X=_A]##K1#Z8)L_U8Y4:RS
M3FD(-0I1KL'N= \8)?.\63^]\0\EVQ)[EMAIL PROTECTED]'I#YL[
M7NSY$W@J#+J`U8-)+8[EMAIL PROTECTED],9*X=^$$CKE$ZGM\4
M*1,[EMAIL PROTECTED],8 ,/[EMAIL PROTECTED](EW_KT4EP-!)CU)?S'42_O.]42ZS(5DS
M1(_=J0?MR1]ET(X^^/(SW]S%Z%.\4\ELRP6;B$Z=#.ZP6D*68+!V
MHI3[9_:!ET*;,'$I+/ ]-W9L1)9+,.1RW4L0?TY$KQ1,[-E RM$LY9(;+@4
MV/[EMAIL PROTECTED] /L$\^)Z'V1;\O!;U)0LQ5Z AM40^W7L!=]L*N,4T'GQG6+@
MTY8%MCPOQ7C8/25_UE= #O#N4K2BM[EMAIL PROTECTED])?I3*R)NL-X?UT`
M: 7L.X%JVB-*('T3*\P^A:8`L_Z-65Q647O-E/_F@')T3!V^TCYE\*H
M* [EMAIL PROTECTED]'/U4I24)S%0-2*87[B3=L+@L0*A*![3#G1J,[EMAIL PROTECTED]'RF(
M[T(41(9J#,PI!\)*C/8D*=4INZ0BA6%TNBO!N3DR#*B:HA7PV6.4/T2=$N
MX-V-5H1X[0$YV]FAU9 @H)O8P208#X_FDE R.3[H3^'3 BT2U9((']N4[!S
M3!7O+38R[%J^+#S4X#%`](0/Q;6JNPXH0X[5HLLDQ''W[EMAIL PROTECTED]!L8
MWK?A(+[EMAIL PROTECTED])-L*GT,[EMAIL PROTECTED]R_-.$X%BBAT__R$\QC# 6
M8+5=P^TI^$=UW*]U06'325$!JF=ND) X#^-WF!W/[EMAIL PROTECTED]@3
MD(#3\U 0!3DGMO$V$+,31(Z211:01::A3)95%C 4=9ZUK(2)CIM,M)G
M(P`G$M A2U(JK-GA?F8F%+2,3(F;;:%^^]!T3V0M1?FG]F8WJ[EMAIL PROTECTED]
M999-%!D$9$E0U?`PP%#2_%#JU\PS/1=?+,*9PF2PX2TUYTPYSV9=M27ZC
MXK(Y1D2)FWII$'WCH8.U[P9K[X.]1X\S5.P%)BSH%\/BX7E0!,*O0L()M/
MXV,[EMAIL PROTECTED](0]MA3G!0(XBLL23$SX7!+ 9H9;)08Y$- L6'32-K]?G)$9
M:U0+6+A;D)[EMAIL PROTECTED]2\'[EMAIL PROTECTED])PVU!SSHEJY
M)+GMA[EO#]#]S,??D\D#2R;ZHKF/K4JG*2KE)V6F5:\QA[*VL^]XB,D!^
M-,AZID398JFK:OJ.4G28]2,:=)R4YH;+\0CS$0`)NP_8[[EMAIL PROTECTED])AMA
MQSD3SLG]),/3?6VEWW#_M-X/7W=!7A9P#6.:W'-5HELVW:3T-*`:F^PZ?
M3/0=?C!J;Z_%P[$8KX3/]OA.XJA@4FOE)J^V0I9@;$K5HQJT]7J--:B
M:PG`D/6@'^(?O`-Y0+#FV5B16P+4M_#9AB36I9UWEJ.TX+6:[EMAIL PROTECTED]

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Martin Marques
El Jue 28 Ago 2003 11:25, Ignatius Reilly escribió:
 Well, it IS logical provided one is aware of the rules of the game,
 meaning, as you rightly point out, that MySQL does not reject SQL
 statements for incorrect values, but attempts at converting them at any
 price. I have no clue whether it is or not a shortcoming of the
 implementation (I do not know what SQL-92 says about this). Therefore data
 validation should be done outside MySQL.

The thing that IS ilogical is the way MySQL plays the game. What would you 
think if all of a sudden the date command in linux did something like that 
(try to add some strange date when the given date isn't a valid date)?

Now lets suppose this is a good idea, and one would have to program to get the 
data integrity (data integrity isn't only when the database server fails). 
Then why do I have to put different data types? Let's use text everywhere! Or 
if I do use different data types, what if I have a bug? I could have people 
loading erronous data in the database and not getting an error, and after 
loading lots of information I find the bug, but see that all the data is 
bogus (like the numeric example I gave earlier).

To state it more clearly, I havn't seen Oracle, Informix or PostgreSQL do 
things like this, which reminds me of what someone told me once: MySQL is 
just a FS with an lousy SQL language (and pretty incomplete).

Maybe the problem is that most people never read Codd's 12 rules for a RDBMS:

http://www.byte.com/art/9406/sec8/art11.htm

-- 
 16:23:01 up 6 days,  8:13,  4 users,  load average: 0.16, 0.31, 0.18
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Ignatius Reilly
Well, you're certainly right (except I didn't get the meaning of 'FS' -
anything obscene?). However:

1. The job of this ML is to help people get things done
2. For criticisms concerning the design of MySQL, you may get better results
posting directly at the MySQL dev team.
3. You may decide that another RDBMS may suit your needs better. Someone
told me that Oracle is quite nice.

Ig
_
- Original Message -
From: Martin Marques [EMAIL PROTECTED]
To: Ignatius Reilly [EMAIL PROTECTED]; Peter Beckman
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 9:37 PM
Subject: Re: [PHP-DB] MySQL, PHP or ghost?


El Jue 28 Ago 2003 11:25, Ignatius Reilly escribió:
 Well, it IS logical provided one is aware of the rules of the game,
 meaning, as you rightly point out, that MySQL does not reject SQL
 statements for incorrect values, but attempts at converting them at any
 price. I have no clue whether it is or not a shortcoming of the
 implementation (I do not know what SQL-92 says about this). Therefore data
 validation should be done outside MySQL.

The thing that IS ilogical is the way MySQL plays the game. What would you
think if all of a sudden the date command in linux did something like that
(try to add some strange date when the given date isn't a valid date)?

Now lets suppose this is a good idea, and one would have to program to get
the
data integrity (data integrity isn't only when the database server fails).
Then why do I have to put different data types? Let's use text everywhere!
Or
if I do use different data types, what if I have a bug? I could have people
loading erronous data in the database and not getting an error, and after
loading lots of information I find the bug, but see that all the data is
bogus (like the numeric example I gave earlier).

To state it more clearly, I havn't seen Oracle, Informix or PostgreSQL do
things like this, which reminds me of what someone told me once: MySQL is
just a FS with an lousy SQL language (and pretty incomplete).

Maybe the problem is that most people never read Codd's 12 rules for a
RDBMS:

http://www.byte.com/art/9406/sec8/art11.htm

--
 16:23:01 up 6 days,  8:13,  4 users,  load average: 0.16, 0.31, 0.18
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Code and Review???

2003-08-28 Thread Allens
Hello,
  I'm still pretty new to MySQL, OO PHP and Javascript. Wanted a couple 
of you to review the multidimensional array code  and let me know if 
this code is ok? Also, would like for a couple of you to go to my 
webpage http://homepage.mac.com/ateam3/ateam3/freemain.htm and slide 
down to the Some Work Examples: and click on my test site. Give me a 
review on this demo and let me know your thoughts... only if you have 
some extra time. Wanting to hear from some of the intermediate and 
advanced programmers on where I'm at. Currently self-employed (actually 
unemployed, but want to stay positive) and debating on my next J-o-b vs 
current skills. Thanks to all in advance. :)

Code 

function getwstate()
	{
	  $stateval = array( 0 = array (AL, Alabama),
	   1 = array (AK, Alaska),
	   2 = array (AS, American Samoa),
		 3 = array (AZ, Arizona),
		 4 = array (AR, Arkansas),
		 5 = array (CA, California),
		 6 = array (CO, Colorado),
		 7 = array (CT, Connecticut),
		 8 = array (DE, Delaware),
		 9 = array (DC, District of Columbia),
		 10 = array (FM, Fed. States of Micronesia),
		 11 = array (FL, Florida),
		 12 = array (GA, Georgia),
		 13 = array (GU, Guam),
		 14 = array (HI, Hawaii),
		 15 = array (ID, Idaho),
		 16 = array (IL, Illinois),
		 17 = array (IN, Indiana),
		 18 = array (IA, Iowa),
		 19 = array (KS, Kansas),
		 20 = array (KY, Kentucky),
		 21 = array (LA, Louisiana),
		 22 = array (ME, Maine),
		 23 = array (MH, Marshall Islands),
		 24 = array (MD, Maryland),
		 25 = array (MA, Massachusetts),
		 26 = array (MI, Michigan),
		 27 = array (MN, Minnesota),
		 28 = array (MS, Mississippi),
		 29 = array (MO, Missouri),
		 30 = array (MT, Montana),
		 31 = array (NE, Nebraska),
		 32 = array (NV, Nevada),
		 33 = array (NH, New Hampshire),
		 34 = array (NJ, New Jersey),
		 35 = array (NM, New Mexico),
		 36 = array (NY, New York),
		 37 = array (NC, North Carolina),
		 38 = array (ND, North Dakota),
		 39 = array (MP, Northern Mariana Is.),
		 40 = array (OH, Ohio),
		 41 = array (OK, Oklahoma),
		 42 = array (OR, Oregon),
		 43 = array (PW, Palau),
		 44 = array (PA, Pennsylvania),
		 45 = array (PR, Puerto Rico),
		 46 = array (RI, Rhode Island),
		 47 = array (SC, South Carolina),
		 48 = array (TN, Tennessee),
		 49 = array (TX, Texas),
		 50 = array (UT, Utah),
		 51 = array (VT, Vermont),
		 52 = array (VA, Virginia),
		 53 = array (VI, Virgin Islands),
		 54 = array (WA, Washington),
		 55 = array (WV, West Virginia),
		 56 = array (WI, Wisconsin),
		 57 = array (WY, Wyoming) );
	  $stcnt = count($stateval);
		echo 'select name=wstate size=1 /';
		if ($this-wstate == '')
		{
		  echo 'option value= selectedNo Selection/option';
		  for ($x = 0; $x  $stcnt; $x++)
			{
			  echo 'option 
value='.$stateval[$x][0].''.$stateval[$x][1].'/option';
			}
		}
		else
		{
		  for ($x = 0; $x  $stcnt; $x++)
			{
if ($stateval[$x][0] == $this-wstate)
{
  echo 'option value='.$stateval[$x][0].' 
selected'.$stateval[$x][1].'/option';
}
else
{
	echo 'option 
value='.$stateval[$x][0].''.$stateval[$x][1].'/option';
}	
			}
		}
	  echo '/select';
	}

End of Code 

:)
  Gale L. Allen Jr
  Macintosh Support Specialist
  Phone: 919/412-5039
  Homepage: http://homepage.mac.com/ateam3/Menu5.html
  iChat = [EMAIL PROTECTED]
  Remember, It's only Rock 'n Roll, but I like it!
(:

[PHP-DB] Code and Review ???

2003-08-28 Thread Allens
Hello,
I'm still pretty new to MySQL, OO PHP and Javascript. Wanted a 
couple
of you to review the multidimensional array code  and let me know if
this code is ok? Also, would like for a couple of you to go to my
webpage http://homepage.mac.com/ateam3/ateam3/freemain.htm and slide
down to the Some Work Examples: and click on my test site. Give me a
review on this demo and let me know your thoughts... only if you have
some extra time. Wanting to hear from some of the intermediate and
advanced programmers on where I'm at. Currently self-employed (actually
unemployed, but want to stay positive) and debating on my next J-o-b vs
current skills. Thanks to all in advance. :)

Code 

function getwstate()
{
  $stateval = array( 0 = array (AL, Alabama),
   1 = array (AK, 
Alaska),
   2 = array (AS, 
American Samoa),
 3 = array 
(AZ, Arizona),
 4 = array 
(AR, Arkansas),
 5 = array 
(CA, California),
 6 = array 
(CO, Colorado),
 7 = array 
(CT, Connecticut),
 8 = array 
(DE, Delaware),
 9 = array 
(DC, District of Columbia),
 10 = array 
(FM, Fed. States of Micronesia),
 11 = array 
(FL, Florida),
 12 = array 
(GA, Georgia),
 13 = array 
(GU, Guam),
 14 = array 
(HI, Hawaii),
 15 = array 
(ID, Idaho),
 16 = array 
(IL, Illinois),
 17 = array 
(IN, Indiana),
 18 = array 
(IA, Iowa),
 19 = array 
(KS, Kansas),
 20 = array 
(KY, Kentucky),
 21 = array 
(LA, Louisiana),
 22 = array 
(ME, Maine),
 23 = array 
(MH, Marshall Islands),
 24 = array 
(MD, Maryland),
 25 = array 
(MA, Massachusetts),
 26 = array 
(MI, Michigan),
 27 = array 
(MN, Minnesota),
 28 = array 
(MS, Mississippi),
 29 = array 
(MO, Missouri),
 30 = array 
(MT, Montana),
 31 = array 
(NE, Nebraska),
 32 = array 
(NV, Nevada),
 33 = array 
(NH, New Hampshire),
 34 = array 
(NJ, New Jersey),
 35 = array 
(NM, New Mexico),
 36 = array 
(NY, New York),
 37 = array 
(NC, North Carolina),
 38 = array 
(ND, North Dakota),
  

[PHP-DB] Heop someone can help with this.. involves sessions.

2003-08-28 Thread Aaron Wolski
Hi Guys,
 
I really hope you don't mind the OT post but I've looked everywhere and
can't seem to find a solution to my problem.
 
I am passing a var in a session (not in the URL) to my secure checkout
area and it's not capturing the variable.
 
I know there is a problem with using sessions across non-SSL and SSL but
I was hoping someone would have an idea as to how to accomplish this?
 
Both domains are setup on the same box.. the secure SSL area is
secure.mydomain.com
 
Any ideas?
 
Thanks!
 
Aaron
 


Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Martin Marques
El Jue 28 Ago 2003 17:20, Ignatius Reilly escribió:
 Well, you're certainly right (except I didn't get the meaning of 'FS' -
 anything obscene?). However:

File System.

 1. The job of this ML is to help people get things done
 2. For criticisms concerning the design of MySQL, you may get better
 results posting directly at the MySQL dev team.
 3. You may decide that another RDBMS may suit your needs better. Someone
 told me that Oracle is quite nice.

Except for (2), I have the same opinion as you have. My mail was because I got 
really disturbed while reading the mail, and I think people should know about 
other was of designing an SQL application (or even better was of designing 
your PHP app).

Hopfully I will be giving a 2 hour course at the Linux meeting here at my 
local city (Santa Fe, Argentina) about using PEAR (or other tools of 
abstraction) to get better, and easier to maintain PHP programs.

And to finish, I don't have the same opinion as you have on (2) because I have 
read to much junk from the MySQL dev team (things like primary keys are 
useless).

Just my 2 cents.

P.D.: Yes, Oracle is pretty nice.

-- 
 17:57:01 up 6 days,  9:47,  4 users,  load average: 0.96, 0.75, 0.57
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Test

2003-08-28 Thread Allens
Please disregard. :)

:)
  Gale L. Allen Jr
  Macintosh Support Specialist
  Phone: 919/412-5039
  Homepage: http://homepage.mac.com/ateam3/Menu5.html
  iChat = [EMAIL PROTECTED]
  Remember, It's only Rock 'n Roll, but I like it!
(:

[PHP-DB] Code - Review ???

2003-08-28 Thread Allens
Hello,
 I'm still pretty new to MySQL, OO PHP and Javascript. Wanted a
couple
of you to review the multidimensional array code  and let me know if
this code is ok? Also, would like for a couple of you to go to my
webpage http://homepage.mac.com/ateam3/ateam3/freemain.htm and slide
down to the Some Work Examples: and click on my test site. Give me a
review on this demo and let me know your thoughts... only if you have
some extra time. Wanting to hear from some of the intermediate and
advanced programmers on where I'm at. Currently self-employed (actually
unemployed, but want to stay positive) and debating on my next J-o-b vs
current skills. Thanks to all in advance. :)
function getwstate()
{
  $stateval = array( 0 = array (AL, Alabama),
   1 = array (AK, 
Alaska),
   2 = array (AS, 
American Samoa),
 3 = array 
(AZ, Arizona),
 4 = array 
(AR, Arkansas),
 5 = array 
(CA, California),
 6 = array 
(CO, Colorado),
 7 = array 
(CT, Connecticut),
 8 = array 
(DE, Delaware),
 9 = array 
(DC, District of Columbia),
 10 = array 
(FM, Fed. States of Micronesia),
 11 = array 
(FL, Florida),
 12 = array 
(GA, Georgia),
 13 = array 
(GU, Guam),
 14 = array 
(HI, Hawaii),
 15 = array 
(ID, Idaho),
 16 = array 
(IL, Illinois),
 17 = array 
(IN, Indiana),
 18 = array 
(IA, Iowa),
 19 = array 
(KS, Kansas),
 20 = array 
(KY, Kentucky),
 21 = array 
(LA, Louisiana),
 22 = array 
(ME, Maine),
 23 = array 
(MH, Marshall Islands),
 24 = array 
(MD, Maryland),
 25 = array 
(MA, Massachusetts),
 26 = array 
(MI, Michigan),
 27 = array 
(MN, Minnesota),
 28 = array 
(MS, Mississippi),
 29 = array 
(MO, Missouri),
 30 = array 
(MT, Montana),
 31 = array 
(NE, Nebraska),
 32 = array 
(NV, Nevada),
 33 = array 
(NH, New Hampshire),
 34 = array 
(NJ, New Jersey),
 35 = array 
(NM, New Mexico),
 36 = array 
(NY, New York),
 37 = array 
(NC, North Carolina),
 38 = array 
(ND, North Dakota),