RE: [PHP-DB] checking for 0 results?

2002-11-15 Thread Aaron Wolski
Or you can skip a step like:

$sql = select * from ietsfuckingfriday;

if (mysql_num_rows($result) == 0) {

do_something();

} else {

do_anotherthing();

}

Aaron

-Original Message-
From: Snijders, Mark [mailto:Mark.Snijders;atosorigin.com] 
Sent: November 15, 2002 8:26 AM
To: 'Jonathan Narong'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] checking for 0 results?

$sql = select * from ietsfuckingfriday;

$result = mysql_query($sql);

$num_rows=mysql_num_rows($result);

if ($num_rows==0)echo yesss we did it;


(sorry it's friday :-)

almost can go home :--)



-Original Message-
From: Jonathan Narong [mailto:jon;binaryillusions.com]
Sent: vrijdag 15 november 2002 14:23
To: [EMAIL PROTECTED]
Subject: [PHP-DB] checking for 0 results?


maybe i'm totally not thinking straight right now, but is there a way in
php
to check if 0 results are returned in a mysql query?

for example, i have a definition database, that has a list of letters
the
user clicks on (click on the letter, and all the terms for that letter
pop
up).. but for some letters there are no terms. so i just wanted to echo
out
a simple no terms message or something. in any case, i need to check
if
there are no results from a mysql query (an error won't be returned).

thanks ..

-jon



-- 
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




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




RE: [PHP-DB] checking for 0 results? edit

2002-11-15 Thread Aaron Wolski
Doh!

Edit:

if (mysql_num_rows($sql) == 0) {

Aaron

-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: November 15, 2002 8:42 AM
To: 'Snijders, Mark'; 'Jonathan Narong'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] checking for 0 results?

Or you can skip a step like:

$sql = select * from ietsfuckingfriday;

if (mysql_num_rows($result) == 0) {

do_something();

} else {

do_anotherthing();

}

Aaron

-Original Message-
From: Snijders, Mark [mailto:Mark.Snijders;atosorigin.com] 
Sent: November 15, 2002 8:26 AM
To: 'Jonathan Narong'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] checking for 0 results?

$sql = select * from ietsfuckingfriday;

$result = mysql_query($sql);

$num_rows=mysql_num_rows($result);

if ($num_rows==0)echo yesss we did it;


(sorry it's friday :-)

almost can go home :--)



-Original Message-
From: Jonathan Narong [mailto:jon;binaryillusions.com]
Sent: vrijdag 15 november 2002 14:23
To: [EMAIL PROTECTED]
Subject: [PHP-DB] checking for 0 results?


maybe i'm totally not thinking straight right now, but is there a way in
php
to check if 0 results are returned in a mysql query?

for example, i have a definition database, that has a list of letters
the
user clicks on (click on the letter, and all the terms for that letter
pop
up).. but for some letters there are no terms. so i just wanted to echo
out
a simple no terms message or something. in any case, i need to check
if
there are no results from a mysql query (an error won't be returned).

thanks ..

-jon



-- 
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




-- 
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] checking for 0 results?

2002-11-15 Thread Snijders, Mark
and how does $sql now gets in touch with $result




Or you can skip a step like:

$sql = select * from ietsfuckingfriday;

if (mysql_num_rows($result) == 0) {

do_something();

} else {

do_anotherthing();

}

Aaron

-Original Message-
From: Snijders, Mark [mailto:Mark.Snijders;atosorigin.com] 
Sent: November 15, 2002 8:26 AM
To: 'Jonathan Narong'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] checking for 0 results?

$sql = select * from ietsfuckingfriday;

$result = mysql_query($sql);

$num_rows=mysql_num_rows($result);

if ($num_rows==0)echo yesss we did it;


(sorry it's friday :-)

almost can go home :--)



-Original Message-
From: Jonathan Narong [mailto:jon;binaryillusions.com]
Sent: vrijdag 15 november 2002 14:23
To: [EMAIL PROTECTED]
Subject: [PHP-DB] checking for 0 results?


maybe i'm totally not thinking straight right now, but is there a way in
php
to check if 0 results are returned in a mysql query?

for example, i have a definition database, that has a list of letters
the
user clicks on (click on the letter, and all the terms for that letter
pop
up).. but for some letters there are no terms. so i just wanted to echo
out
a simple no terms message or something. in any case, i need to check
if
there are no results from a mysql query (an error won't be returned).

thanks ..

-jon



-- 
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



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




RE: [PHP-DB] checking for 0 results?

2002-11-15 Thread Hutchins, Richard
Aaron was right initially:

$sql = select * from ietsfuckingfriday;

$result = mysql_query($sql);

$num_rows=mysql_num_rows($result);

Somewhere along the line, things got convoluted, but that's how you check
for 0 rows returned from a query.

 -Original Message-
 From: Snijders, Mark [mailto:Mark.Snijders;atosorigin.com]
 Sent: Friday, November 15, 2002 8:45 AM
 To: 'Aaron Wolski'; 'Jonathan Narong'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] checking for 0 results?
 
 
 and how does $sql now gets in touch with $result
 
 
 
 
 Or you can skip a step like:
 
 $sql = select * from ietsfuckingfriday;
 
 if (mysql_num_rows($result) == 0) {
 
   do_something();
 
 } else {
 
   do_anotherthing();
 
 }
 
 Aaron
 
 -Original Message-
 From: Snijders, Mark [mailto:Mark.Snijders;atosorigin.com] 
 Sent: November 15, 2002 8:26 AM
 To: 'Jonathan Narong'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] checking for 0 results?
 
 $sql = select * from ietsfuckingfriday;
 
 $result = mysql_query($sql);
 
 $num_rows=mysql_num_rows($result);
 
 if ($num_rows==0)echo yesss we did it;
 
 
 (sorry it's friday :-)
 
 almost can go home :--)
 
 
 
 -Original Message-
 From: Jonathan Narong [mailto:jon;binaryillusions.com]
 Sent: vrijdag 15 november 2002 14:23
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] checking for 0 results?
 
 
 maybe i'm totally not thinking straight right now, but is 
 there a way in
 php
 to check if 0 results are returned in a mysql query?
 
 for example, i have a definition database, that has a list of letters
 the
 user clicks on (click on the letter, and all the terms for that letter
 pop
 up).. but for some letters there are no terms. so i just 
 wanted to echo
 out
 a simple no terms message or something. in any case, i need to check
 if
 there are no results from a mysql query (an error won't be returned).
 
 thanks ..
 
 -jon
 
 
 
 -- 
 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
 
 
 
 -- 
 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] serious help with linking data together...

2002-11-15 Thread Jason Vincent
you haven't really said what the problem is - but this is what I can see...

Functions like COUNT, MAX and MIN etc. are group functions (or aggregate
functions).  For example, select count(*) actually only returns 1 record -
the total count.  When you mix aggregate functions with regular selects
(that return many rows - like select keyword) you are going to get strange
results.

What are you seeing

Regards,

J


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Thursday, November 14, 2002 5:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] serious help with linking data together...


Hey all,

Been trying too figure this out all day.

First off I'll explain what I am TRYING to do.


I am creating a Search Engine Tracking Report that lists keywords and the
Search Engines used on that keyword along with the count total for that
search Engine - example:


Keyword Search Engine   Count

Web hosting Yahoo
27
Google
20
MSN
12

Web Design  Overture
30
MSN
17



So on and so forth.


Seems simple right? But no not for me!

CODE:

?php

$keyQuery = db_query(SELECT keyword, COUNT(keyword) as kTotal FROM
SiteTrackingTable WHERE $query GROUP BY keyword);
while ($keyResult = db_fetch($keyQuery)) {

if (strlen($keyResult[keyword])  2) {

$refQuery = db_query(SELECT *, COUNT(referer)
as refTotal FROM SiteTrackingTable WHERE keyword=.$keyResult[keyword].
GROUP BY referer ORDER BY refTotal DESC);
$nrows = db_numrows($refQuery);

?

tr valign=top

td class=content2?php echo $keyResult[keyword]; ?/td

td colspan=2

table border=0 cellpadding=0 cellspacing=0 width=250

tr valign=top

tdimg src=../Graphics/spacer.gif  width=150 height=1/td

tdimg src=../Graphics/spacer.gif  width=100 height=1/td

/tr
?php

while ($refResult = db_fetch($refQuery)) {

?

tr valign=top

td class=content2?php echo $refResult[referer]; ?/td

td class=content2 align=center?php echo $refResult[refTotal]; ?/td

/tr
?php

}

?

/table


/td

/tr
?php

}


}

?


If this is too messed up let me know and I'll reformat.

Sorry guy the annoying question guys.

Aaron





Re: [PHP-DB] checking for 0 results?

2002-11-15 Thread 1LT John W. Holmes
How about:

$sql =  ... ;
$result = mysql_query($sql);
if($row = mysql_fetch_row($result))
{
  do
  {
//process results in $row
  }while($row = mysql_fetch_row($result);
}
else
{ //no results }

This way you don't have to make an extra call to mysql_num_rows() and it
saves you time.

---John Holmes...

- Original Message -
From: Hutchins, Richard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 15, 2002 8:47 AM
Subject: RE: [PHP-DB] checking for 0 results?


 Aaron was right initially:

 $sql = select * from ietsfuckingfriday;

 $result = mysql_query($sql);

 $num_rows=mysql_num_rows($result);

 Somewhere along the line, things got convoluted, but that's how you check
 for 0 rows returned from a query.

  -Original Message-
  From: Snijders, Mark [mailto:Mark.Snijders;atosorigin.com]
  Sent: Friday, November 15, 2002 8:45 AM
  To: 'Aaron Wolski'; 'Jonathan Narong'; [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] checking for 0 results?
 
 
  and how does $sql now gets in touch with $result
 
 
 
 
  Or you can skip a step like:
 
  $sql = select * from ietsfuckingfriday;
 
  if (mysql_num_rows($result) == 0) {
 
  do_something();
 
  } else {
 
  do_anotherthing();
 
  }
 
  Aaron
 
  -Original Message-
  From: Snijders, Mark [mailto:Mark.Snijders;atosorigin.com]
  Sent: November 15, 2002 8:26 AM
  To: 'Jonathan Narong'; [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] checking for 0 results?
 
  $sql = select * from ietsfuckingfriday;
 
  $result = mysql_query($sql);
 
  $num_rows=mysql_num_rows($result);
 
  if ($num_rows==0)echo yesss we did it;
 
 
  (sorry it's friday :-)
 
  almost can go home :--)
 
 
 
  -Original Message-
  From: Jonathan Narong [mailto:jon;binaryillusions.com]
  Sent: vrijdag 15 november 2002 14:23
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] checking for 0 results?
 
 
  maybe i'm totally not thinking straight right now, but is
  there a way in
  php
  to check if 0 results are returned in a mysql query?
 
  for example, i have a definition database, that has a list of letters
  the
  user clicks on (click on the letter, and all the terms for that letter
  pop
  up).. but for some letters there are no terms. so i just
  wanted to echo
  out
  a simple no terms message or something. in any case, i need to check
  if
  there are no results from a mysql query (an error won't be returned).
 
  thanks ..
 
  -jon
 
 
 
  --
  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
 
 
 
  --
  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



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




RE: [PHP-DB] serious help with linking data together...

2002-11-15 Thread Aaron Wolski
Hi all,

Sorry about not posting the problem that I was having. Was hard to
explain without showing an example page and figure there was a problem
with the code SQL itself that someone would spot off the bat.

Anyway.. here's a link: http://www.rinkrake.com/blah.php

You'll see what I am trying to do but here are the problems:

I want to order the keywords from MOST to least (so I guess I need a
count on the keyword grouping then ORDER by it.

Some of the keywords aren't showing ANY Search Engine info. Each keyword
DOES have a Search Engine associated with it.

All seems very confusing to me and I don't know how to trouble shoot
this :(

Here's the code again and thanks very much for your time.

HTML
HEAD
/HEAD

link rel=stylesheet href=styles.css type=text/css

BODY

table border=0 cellpadding=0 cellspacing=0 width=600  
tr valign=top
tdimg src=Graphics/spacer.gif  width=350
height=1/td
tdimg src=Graphics/spacer.gif  width=150
height=1/td
tdimg src=Graphics/spacer.gif  width=100
height=1/td
/tr
tr valign=top
td class=content_boldKeyword/td
td class=content_boldSearch Engine/td
td class=content_bold
align=centerCount/td
/tr
?php

$keyQuery = db_query(SELECT * FROM SiteTrackingTable WHERE
keyword' ' GROUP BY keyword);
while ($keyResult = db_fetch($keyQuery)) {

$refQuery = db_query(SELECT referer,
COUNT(referer) as refTotal FROM SiteTrackingTable WHERE
keyword=.$keyResult[keyword]. GROUP BY referer);
$nrows = db_numrows($refQuery);

?
tr valign=top
td class=content2?php echo
$keyResult[keyword]; ?/td
td colspan=2
table border=0 cellpadding=0
cellspacing=0 width=250
tr valign=top
tdimg
src=Graphics/spacer.gif  width=150 height=1/td
tdimg
src=Graphics/spacer.gif  width=100 height=1/td
/tr
?php

while ($refResult = db_fetch($refQuery)) {

?
tr valign=top
td
class=content2?php echo $refResult[referer]; ?/td
td class=content2
align=center?php echo $refResult[refTotal]; ?/td
/tr
?php

}

?
/table

/td
/tr
tr valign=top
td colspan=3img src=Graphics/spacer.gif
width=600 height=10/td
/tr
?php


}

?
/table
/BODY
/HTML



-Original Message-
From: Jason Vincent [mailto:jayv;nortelnetworks.com] 
Sent: November 15, 2002 8:51 AM
To: Aaron Wolski; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] serious help with linking data together...

you haven't really said what the problem is - but this is what I can
see...

Functions like COUNT, MAX and MIN etc. are group functions (or aggregate
functions).  For example, select count(*) actually only returns 1 record
-
the total count.  When you mix aggregate functions with regular selects
(that return many rows - like select keyword) you are going to get
strange
results.

What are you seeing

Regards,

J


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Thursday, November 14, 2002 5:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] serious help with linking data together...


Hey all,

Been trying too figure this out all day.

First off I'll explain what I am TRYING to do.


I am creating a Search Engine Tracking Report that lists keywords and
the
Search Engines used on that keyword along with the count total for that
search Engine - example:


Keyword Search Engine   Count

Web hosting Yahoo
27
Google
20
MSN
12

Web Design  Overture
30
MSN
17



So on and so forth.


Seems simple right? But no not for me!

CODE:

?php

$keyQuery = db_query(SELECT keyword, COUNT(keyword) as kTotal
FROM
SiteTrackingTable WHERE $query GROUP BY keyword);
while ($keyResult = db_fetch($keyQuery)) {

if (strlen($keyResult[keyword])  2) {

$refQuery = db_query(SELECT *, COUNT(referer)
as refTotal FROM SiteTrackingTable WHERE keyword=.$keyResult[keyword].
GROUP BY referer ORDER BY refTotal DESC);
$nrows = db_numrows($refQuery);

?

tr valign=top

td class=content2?php echo 

RE: [PHP-DB] serious help with linking data together...

2002-11-15 Thread Aaron Wolski
By George I think I may have got it!


Code:


HTML
HEAD
/HEAD

link rel=stylesheet href=styles.css type=text/css

BODY

table border=0 cellpadding=0 cellspacing=0 width=600  
tr valign=top
tdimg src=Graphics/spacer.gif  width=350
height=1/td
tdimg src=Graphics/spacer.gif  width=150
height=1/td
tdimg src=Graphics/spacer.gif  width=100
height=1/td
/tr
tr valign=top
td class=content_boldKeyword/td
td class=content_boldSearch Engine/td
td class=content_bold
align=centerCount/td
/tr
?php

$keyQuery = db_query(SELECT *, COUNT(keyword) as kTotal FROM
SiteTrackingTable WHERE keyword' ' GROUP BY keyword ORDER BY kTotal
DESC);
while ($keyResult = db_fetch($keyQuery)) {

$refQuery = db_query(select referer,
COUNT(referer) as refTotal FROM SiteTrackingTable WHERE
keyword=.escapeQuote($keyResult[keyword]). GROUP BY referer ORDER BY
refTotal DESC);
$nrows = db_numrows($refQuery);

?
tr valign=top
td class=content2?php echo
$keyResult[keyword]; ?/td
td colspan=2
table border=0 cellpadding=0
cellspacing=0 width=250
tr valign=top
tdimg
src=Graphics/spacer.gif  width=150 height=1/td
tdimg
src=Graphics/spacer.gif  width=100 height=1/td
/tr
?php

while ($refResult = db_fetch($refQuery)) {

?
tr valign=top
td
class=content2?php echo $refResult[referer]; ?/td
td class=content2
align=center?php echo $refResult[refTotal]; ?/td
/tr
?php

}

?
/table

/td
/tr
tr valign=top
td colspan=3img src=Graphics/spacer.gif
width=600 height=10/td
/tr
?php


}

?
/table
/BODY
/HTML


Link:  http://www.rinkrake.com/blah.php


Wacha think?

Aaron



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




[PHP-DB] Email Encryption?

2002-11-15 Thread Aaron Wolski
OFFTOPIC
 
Sorry for the off topic guys..
 
But I've just been informed that an application we developed for a
client whereby they use an Admin tool to setup user accounts into their
store needs to have the login (username and password) encrypted.
 
I am thinking PGP for this but to be honest I've never really worked
with PGP and wouldn't have the first clue.
 
Does anyone have any experience with this or can offer and advise at
all?
 
Again, sorry for the OT discussion.
 
Aaron



RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Aaron Wolski
Just thinking here..


PGP is not an option as it would mean EACH user being setup would need
the company's public key to decrypt. Not possible as they setup a few
hundred accounts each month.

Hmm.. anything else?

Argh :(

Aaron

-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: November 15, 2002 11:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Email Encryption?

OFFTOPIC
 
Sorry for the off topic guys..
 
But I've just been informed that an application we developed for a
client whereby they use an Admin tool to setup user accounts into their
store needs to have the login (username and password) encrypted.
 
I am thinking PGP for this but to be honest I've never really worked
with PGP and wouldn't have the first clue.
 
Does anyone have any experience with this or can offer and advise at
all?
 
Again, sorry for the OT discussion.
 
Aaron



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




RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Jason Vincent
Why email? If the Admin tool uses SSL, that is all you need.

Regards,

J


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Friday, November 15, 2002 11:39 AM
To: 'Aaron Wolski'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?


Just thinking here..


PGP is not an option as it would mean EACH user being setup would need the
company's public key to decrypt. Not possible as they setup a few hundred
accounts each month.

Hmm.. anything else?

Argh :(

Aaron

-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: November 15, 2002 11:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Email Encryption?

OFFTOPIC
 
Sorry for the off topic guys..
 
But I've just been informed that an application we developed for a client
whereby they use an Admin tool to setup user accounts into their store needs
to have the login (username and password) encrypted.
 
I am thinking PGP for this but to be honest I've never really worked with
PGP and wouldn't have the first clue.
 
Does anyone have any experience with this or can offer and advise at all?
 
Again, sorry for the OT discussion.
 
Aaron



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




RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Hutchins, Richard
Can you explain how e-mail fits into the Admin solution? What is the e-mail
used for? Setting up the accounts/passwords or sending the account/password
to the user?

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: Friday, November 15, 2002 11:39 AM
 To: 'Aaron Wolski'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?
 
 
 Just thinking here..
 
 
 PGP is not an option as it would mean EACH user being setup would need
 the company's public key to decrypt. Not possible as they setup a few
 hundred accounts each month.
 
 Hmm.. anything else?
 
 Argh :(
 
 Aaron
 
 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
 Sent: November 15, 2002 11:36 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Email Encryption?
 
 OFFTOPIC
  
 Sorry for the off topic guys..
  
 But I've just been informed that an application we developed for a
 client whereby they use an Admin tool to setup user accounts 
 into their
 store needs to have the login (username and password) encrypted.
  
 I am thinking PGP for this but to be honest I've never really worked
 with PGP and wouldn't have the first clue.
  
 Does anyone have any experience with this or can offer and advise at
 all?
  
 Again, sorry for the OT discussion.
  
 Aaron
 
 
 
 -- 
 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] Email Encryption?

2002-11-15 Thread Aaron Wolski
Well.
 
Its not what they want.. it what one of their clients want (very big
corporation with very unrealistic security standards - you'd think they
were NASA or something *grumble*)
 
Their thought is that someone could hack the received email, login to
the store using the publically displayed logins details and reek havoc
on the store, etc.
 
*shrugs* Sadly this isn't open for debate as a solutions IS required.
 
Any thoughts?
 
Aaron
 
-Original Message-
From: Jason Vincent [mailto:jayv;nortelnetworks.com] 
Sent: November 15, 2002 11:42 AM
To: Aaron Wolski; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?
 
Why email? If the Admin tool uses SSL, that is all you need. 
Regards, 
J 
 
-Original Message- 
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Friday, November 15, 2002 11:39 AM 
To: 'Aaron Wolski'; [EMAIL PROTECTED] 
Subject: RE: [PHP-DB] Email Encryption? 
 
Just thinking here.. 
 
PGP is not an option as it would mean EACH user being setup would need
the company's public key to decrypt. Not possible as they setup a few
hundred accounts each month.
Hmm.. anything else? 
Argh :( 
Aaron 
-Original Message- 
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: November 15, 2002 11:36 AM 
To: [EMAIL PROTECTED] 
Subject: [PHP-DB] Email Encryption? 
OFFTOPIC 
  
Sorry for the off topic guys.. 
  
But I've just been informed that an application we developed for a
client whereby they use an Admin tool to setup user accounts into their
store needs to have the login (username and password) encrypted.
  
I am thinking PGP for this but to be honest I've never really worked
with PGP and wouldn't have the first clue. 
  
Does anyone have any experience with this or can offer and advise at
all? 
  
Again, sorry for the OT discussion. 
  
Aaron 
 
-- 
PHP Database Mailing List (http://www.php.net/) 
To unsubscribe, visit: http://www.php.net/unsub.php 



[PHP-DB] database update question

2002-11-15 Thread chip . wiegand
I have a database with several hundred entries of file names that end with
.pdf. I have converted
all those docs to .zip, now I need to change all the entries in the
database to .zip. I tried to use
update table_name set col_name='%.zip' where col_name like '%.pdf'  id
= '11'
but of course that changed the file name for id 11 to %.zip. Is there a way
to change all the
entries from .pdf to .zip without writing an update statement for each
individual row?

--
Chip Wiegand
Computer Services
Simrad, Inc
www.simradusa.com
[EMAIL PROTECTED]

There is no reason anyone would want a computer in their home.
 --Ken Olson, president, chairman and founder of Digital Equipment
Corporation, 1977
 (They why do I have 8? Somebody help me!)



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




RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Cal Evans
Instead of emailing them the login and password info, setup a fax gateway
and fax it to them. I used this in a situation that needed to be HIPA
compliant.

(If security is still an issue, fold the fax before sending it.)  :)

HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
Sent: Friday, November 15, 2002 10:47 AM
To: 'Hutchins, Richard'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?


The user account is setup via the Admin util.

The details are emailed to the account holder.

Profile and Login information are contained within.


Aaron

-Original Message-
From: Hutchins, Richard [mailto:Richard.Hutchins;GetingeCastle.com]
Sent: November 15, 2002 11:43 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?

Can you explain how e-mail fits into the Admin solution? What is the
e-mail
used for? Setting up the accounts/passwords or sending the
account/password
to the user?

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: Friday, November 15, 2002 11:39 AM
 To: 'Aaron Wolski'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?


 Just thinking here..


 PGP is not an option as it would mean EACH user being setup would need
 the company's public key to decrypt. Not possible as they setup a few
 hundred accounts each month.

 Hmm.. anything else?

 Argh :(

 Aaron

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: November 15, 2002 11:36 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Email Encryption?

 OFFTOPIC

 Sorry for the off topic guys..

 But I've just been informed that an application we developed for a
 client whereby they use an Admin tool to setup user accounts
 into their
 store needs to have the login (username and password) encrypted.

 I am thinking PGP for this but to be honest I've never really worked
 with PGP and wouldn't have the first clue.

 Does anyone have any experience with this or can offer and advise at
 all?

 Again, sorry for the OT discussion.

 Aaron



 --
 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




--
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




[PHP-DB] Re: database update question

2002-11-15 Thread Coert Metz
You can let PHP create all the update Statements into
a while loop. Or is that wat you don't want to do?

Coert

Chip Wiegand wrote:

I have a database with several hundred entries of file names that end with
.pdf. I have converted
all those docs to .zip, now I need to change all the entries in the
database to .zip. I tried to use
update table_name set col_name='%.zip' where col_name like '%.pdf'  id
= '11'
but of course that changed the file name for id 11 to %.zip. Is there a way
to change all the
entries from .pdf to .zip without writing an update statement for each
individual row?

--
Chip Wiegand
Computer Services
Simrad, Inc
www.simradusa.com
[EMAIL PROTECTED]

There is no reason anyone would want a computer in their home.
 --Ken Olson, president, chairman and founder of Digital Equipment
Corporation, 1977
 (They why do I have 8? Somebody help me!)





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




RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Aaron Wolski
Hmm...

Could you provide more info on the fax gateway? Have not used this
before and would appreciate the info you could provide so I can consider
the development and implementation costs, etc.

Note: this all has to be automatically done as to not create anymore
work for my client. This system is supposed to simplify their lives not
complicate :(

Aaron

-Original Message-
From: Cal Evans [mailto:cal;calevans.com] 
Sent: November 15, 2002 11:54 AM
To: Aaron Wolski; 'Hutchins, Richard'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?

Instead of emailing them the login and password info, setup a fax
gateway
and fax it to them. I used this in a situation that needed to be HIPA
compliant.

(If security is still an issue, fold the fax before sending it.)  :)

HTH,
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
Sent: Friday, November 15, 2002 10:47 AM
To: 'Hutchins, Richard'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?


The user account is setup via the Admin util.

The details are emailed to the account holder.

Profile and Login information are contained within.


Aaron

-Original Message-
From: Hutchins, Richard [mailto:Richard.Hutchins;GetingeCastle.com]
Sent: November 15, 2002 11:43 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?

Can you explain how e-mail fits into the Admin solution? What is the
e-mail
used for? Setting up the accounts/passwords or sending the
account/password
to the user?

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: Friday, November 15, 2002 11:39 AM
 To: 'Aaron Wolski'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?


 Just thinking here..


 PGP is not an option as it would mean EACH user being setup would need
 the company's public key to decrypt. Not possible as they setup a few
 hundred accounts each month.

 Hmm.. anything else?

 Argh :(

 Aaron

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: November 15, 2002 11:36 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Email Encryption?

 OFFTOPIC

 Sorry for the off topic guys..

 But I've just been informed that an application we developed for a
 client whereby they use an Admin tool to setup user accounts
 into their
 store needs to have the login (username and password) encrypted.

 I am thinking PGP for this but to be honest I've never really worked
 with PGP and wouldn't have the first clue.

 Does anyone have any experience with this or can offer and advise at
 all?

 Again, sorry for the OT discussion.

 Aaron



 --
 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




--
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] Email Encryption?

2002-11-15 Thread Hutchins, Richard
Aaron,

I don't know much about encryption other than just using PGP myself.
However, I would think that encrypting an e-mail message and sending it to a
user would require the user to have a key to decrypt it as well as some
client side software to actually perform the decryption. Seems like an
unreliable requirement.

Are they dead set on encrypting the e-mail? If you can convince them
otherwise, here's a solution I've been put through on a couple sites out
there:

1. I sign up for an account by providing my e-mail address and a username.
2. I receive an e-mail from the site saying You signed up, this message
confirms your e-mail address is valid and here's a temp password. Go change
it. But this message does not contain the username I've entered on the
site.
3. I go back to the site, enter my username and temp password and change it
to something meaningful to me.
4. I get access to what I'm supposed to have access to.
5. I receive a confirmation e-mail just saying that the password for my
account on this site has been changed. But, neither the username NOR
password is not included in the e-mail.

The security here is that the username is NEVER sent to the user. If
e-mails were intercepted, the hacker would have the password, but not the
username. As long as both are required for authentication, you should be
set. You could reverse this logic by sending the username and never the
password with similar results.

Might not necessarily be the BEST solution, but I've seen it used in various
places.

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: Friday, November 15, 2002 11:47 AM
 To: 'Hutchins, Richard'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?
 
 
 The user account is setup via the Admin util.
 
 The details are emailed to the account holder.
 
 Profile and Login information are contained within.
 
 
 Aaron
 
 -Original Message-
 From: Hutchins, Richard [mailto:Richard.Hutchins;GetingeCastle.com] 
 Sent: November 15, 2002 11:43 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?
 
 Can you explain how e-mail fits into the Admin solution? What is the
 e-mail
 used for? Setting up the accounts/passwords or sending the
 account/password
 to the user?
 
  -Original Message-
  From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
  Sent: Friday, November 15, 2002 11:39 AM
  To: 'Aaron Wolski'; [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] Email Encryption?
  
  
  Just thinking here..
  
  
  PGP is not an option as it would mean EACH user being setup 
 would need
  the company's public key to decrypt. Not possible as they 
 setup a few
  hundred accounts each month.
  
  Hmm.. anything else?
  
  Argh :(
  
  Aaron
  
  -Original Message-
  From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
  Sent: November 15, 2002 11:36 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Email Encryption?
  
  OFFTOPIC
   
  Sorry for the off topic guys..
   
  But I've just been informed that an application we developed for a
  client whereby they use an Admin tool to setup user accounts 
  into their
  store needs to have the login (username and password) encrypted.
   
  I am thinking PGP for this but to be honest I've never really worked
  with PGP and wouldn't have the first clue.
   
  Does anyone have any experience with this or can offer and advise at
  all?
   
  Again, sorry for the OT discussion.
   
  Aaron
  
  
  
  -- 
  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
 
 
 
 

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




RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Jason Vincent
What I was getting it is, have the 'users' log into a secure web page and
create their own user names and passwords (and enter their email address).
Then just have the admin 'approve' the request and this sends them an email
saying that their access has been granted - that way no information is ever
passed via email.

Regards,

Jason Vincent
Voice Architecture, Nortel Networks
(905) 863-7480 (ESN 333)
[EMAIL PROTECTED]


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Friday, November 15, 2002 11:47 AM
To: 'Hutchins, Richard'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?


The user account is setup via the Admin util.

The details are emailed to the account holder.

Profile and Login information are contained within.


Aaron

-Original Message-
From: Hutchins, Richard [mailto:Richard.Hutchins;GetingeCastle.com] 
Sent: November 15, 2002 11:43 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?

Can you explain how e-mail fits into the Admin solution? What is the e-mail
used for? Setting up the accounts/passwords or sending the account/password
to the user?

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: Friday, November 15, 2002 11:39 AM
 To: 'Aaron Wolski'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?
 
 
 Just thinking here..
 
 
 PGP is not an option as it would mean EACH user being setup would need 
 the company's public key to decrypt. Not possible as they setup a few 
 hundred accounts each month.
 
 Hmm.. anything else?
 
 Argh :(
 
 Aaron
 
 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: November 15, 2002 11:36 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Email Encryption?
 
 OFFTOPIC
  
 Sorry for the off topic guys..
  
 But I've just been informed that an application we developed for a 
 client whereby they use an Admin tool to setup user accounts into 
 their store needs to have the login (username and password) encrypted.
  
 I am thinking PGP for this but to be honest I've never really worked 
 with PGP and wouldn't have the first clue.
  
 Does anyone have any experience with this or can offer and advise at 
 all?
  
 Again, sorry for the OT discussion.
  
 Aaron
 
 
 
 --
 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




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




Re: [PHP-DB] database update question

2002-11-15 Thread Joshua Stein
 Is there a way to change all the entries from .pdf to .zip without
 writing an update statement for each individual row?

UPDATE table_name SET col_name = LEFT(col_name, LEN(col_name) - 4) +
'.zip' WHERE col_name LIKE '%.pdf'


   -j.

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




Re: [PHP-DB] database update question

2002-11-15 Thread Jason Wong
On Saturday 16 November 2002 00:53, [EMAIL PROTECTED] wrote:
 I have a database with several hundred entries of file names that end with
 .pdf. I have converted
 all those docs to .zip, now I need to change all the entries in the
 database to .zip. I tried to use
 update table_name set col_name='%.zip' where col_name like '%.pdf'  id
 = '11'
 but of course that changed the file name for id 11 to %.zip. Is there a way
 to change all the
 entries from .pdf to .zip without writing an update statement for each
 individual row?

  UPDATE table_name SET col_name = REPLACE(col_name, '.pdf', '.zip');

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
Politicians should read science fiction, not westerns and detective stories.
-- Arthur C. Clarke
*/


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




RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Aaron Wolski
Yeah,
 
This is one solutions I thought of.
 
Problem is. the whole premise of the application is that it is hassle
free for my client as well as their clients.
 
By adding in this step (if last resort I will have to) we get rid of the
hassle free concept and perhaps diminish the effectiveness () of
the app.
 
 
Thanks again.
 
Aaron
 
-Original Message-
From: Jason Vincent [mailto:jayv;nortelnetworks.com] 
Sent: November 15, 2002 12:05 PM
To: Aaron Wolski; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?
 
What I was getting it is, have the 'users' log into a secure web page
and create their own user names and passwords (and enter their email
address).  Then just have the admin 'approve' the request and this sends
them an email saying that their access has been granted - that way no
information is ever passed via email.
Regards, 
Jason Vincent 
Voice Architecture, Nortel Networks 
(905) 863-7480 (ESN 333) 
[EMAIL PROTECTED] 
 
-Original Message- 
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Friday, November 15, 2002 11:47 AM 
To: 'Hutchins, Richard'; [EMAIL PROTECTED] 
Subject: RE: [PHP-DB] Email Encryption? 
 
The user account is setup via the Admin util. 
The details are emailed to the account holder. 
Profile and Login information are contained within. 
 
Aaron 
-Original Message- 
From: Hutchins, Richard [mailto:Richard.Hutchins;GetingeCastle.com] 
Sent: November 15, 2002 11:43 AM 
To: [EMAIL PROTECTED] 
Subject: RE: [PHP-DB] Email Encryption? 
Can you explain how e-mail fits into the Admin solution? What is the
e-mail used for? Setting up the accounts/passwords or sending the
account/password to the user?
 -Original Message- 
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
 Sent: Friday, November 15, 2002 11:39 AM 
 To: 'Aaron Wolski'; [EMAIL PROTECTED] 
 Subject: RE: [PHP-DB] Email Encryption? 
 
 
 Just thinking here.. 
 
 
 PGP is not an option as it would mean EACH user being setup would need

 the company's public key to decrypt. Not possible as they setup a few 
 hundred accounts each month. 
 
 Hmm.. anything else? 
 
 Argh :( 
 
 Aaron 
 
 -Original Message- 
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
 Sent: November 15, 2002 11:36 AM 
 To: [EMAIL PROTECTED] 
 Subject: [PHP-DB] Email Encryption? 
 
 OFFTOPIC 
  
 Sorry for the off topic guys.. 
  
 But I've just been informed that an application we developed for a 
 client whereby they use an Admin tool to setup user accounts into 
 their store needs to have the login (username and password) encrypted.

  
 I am thinking PGP for this but to be honest I've never really worked 
 with PGP and wouldn't have the first clue. 
  
 Does anyone have any experience with this or can offer and advise at 
 all? 
  
 Again, sorry for the OT discussion. 
  
 Aaron 
 
 
 
 -- 
 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 



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



[PHP-DB] phpmysqladmin

2002-11-15 Thread Matt Giddings
Anybody have the url for phpmysqladmin?  I believe phpmysqladmin is a
web interface for mysql.  I'm sure someone will correct me if I'm wrong.
: )

Thanks,
Matt 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.399 / Virus Database: 226 - Release Date: 10/9/2002
 


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




RE: [PHP-DB] phpmysqladmin

2002-11-15 Thread Jason Vincent

http://www.phpwizard.net/projects/phpMyAdmin/

yes it is - and it is a great tool

J


-Original Message-
From: Matt Giddings [mailto:cen10761;centurytel.net] 
Sent: Friday, November 15, 2002 12:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] phpmysqladmin


Anybody have the url for phpmysqladmin?  I believe phpmysqladmin is a web
interface for mysql.  I'm sure someone will correct me if I'm wrong.
: )

Thanks,
Matt 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.399 / Virus Database: 226 - Release Date: 10/9/2002
 


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




Re: [PHP-DB] phpmysqladmin

2002-11-15 Thread David Chien

 Anybody have the url for phpmysqladmin?  I believe phpmysqladmin is a
 web interface for mysql.  I'm sure someone will correct me if I'm wrong.
 : )

phpMyAdmin - MySQL DB Administration tool.
http://phpmyadmin.sourceforge.net/


-David-
___ 
DAVID CHIEN:  ILLUSTRATOR, DESIGNER
  
[em] [EMAIL PROTECTED]
  
[wb] http://nakedgremlin.com


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




Re: [PHP-DB] phpmysqladmin

2002-11-15 Thread Peter Beckman
phpMyAdmin

search for it on sourceforge.net

On Fri, 15 Nov 2002, Matt Giddings wrote:

 Anybody have the url for phpmysqladmin?  I believe phpmysqladmin is a
 web interface for mysql.  I'm sure someone will correct me if I'm wrong.
 : )

 Thanks,
 Matt

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.399 / Virus Database: 226 - Release Date: 10/9/2002



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


---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[EMAIL PROTECTED] http://www.purplecow.com/
---


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




RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Peter Beckman
Why not encrypt the password in the DB?  If they lose their password, it
cannot be sent to them.  They chose it, so it doesn't need to be sent to
them in their email.  If they lose it, it is changed, and they have to
change it again.  That way, only if they are stupid do they have an extra
step.

The passwords in the DB are encrypted, so only if someone gets a hold of
the DB can the passwords be cracked by brute force.

md5 would work fine for this.  It is the same security that FreeBSD uses in
their password file.

Peter

On Fri, 15 Nov 2002, Aaron Wolski wrote:

 Well.

 Its not what they want.. it what one of their clients want (very big
 corporation with very unrealistic security standards - you'd think they
 were NASA or something *grumble*)

 Their thought is that someone could hack the received email, login to
 the store using the publically displayed logins details and reek havoc
 on the store, etc.

 *shrugs* Sadly this isn't open for debate as a solutions IS required.

 Any thoughts?

 Aaron

 -Original Message-
 From: Jason Vincent [mailto:jayv;nortelnetworks.com]
 Sent: November 15, 2002 11:42 AM
 To: Aaron Wolski; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?

 Why email? If the Admin tool uses SSL, that is all you need.
 Regards,
 J

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: Friday, November 15, 2002 11:39 AM
 To: 'Aaron Wolski'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?

 Just thinking here..

 PGP is not an option as it would mean EACH user being setup would need
 the company's public key to decrypt. Not possible as they setup a few
 hundred accounts each month.
 Hmm.. anything else?
 Argh :(
 Aaron
 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: November 15, 2002 11:36 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Email Encryption?
 OFFTOPIC

 Sorry for the off topic guys..

 But I've just been informed that an application we developed for a
 client whereby they use an Admin tool to setup user accounts into their
 store needs to have the login (username and password) encrypted.

 I am thinking PGP for this but to be honest I've never really worked
 with PGP and wouldn't have the first clue.

 Does anyone have any experience with this or can offer and advise at
 all?

 Again, sorry for the OT discussion.

 Aaron

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


---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[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] Re: checking for 0 results?

2002-11-15 Thread Hp
Use mysql_num_rows() to return the amount of rows selected with your query.

example:

?php
/* DB connection stuff comes here */

$query = SELECT * FROM table;
$getdata = mysql_query($query);

if(mysql_num_rows($getdata)){
   // output fetched rows
}
else{
   echo no terms;
}
?

Jonathan Narong [EMAIL PROTECTED] wrote in message
news:KLEHIEPKGMOHKIMODPDHAEBCCFAA.jon;binaryillusions.com...
 maybe i'm totally not thinking straight right now, but is there a way in
php
 to check if 0 results are returned in a mysql query?

 for example, i have a definition database, that has a list of letters the
 user clicks on (click on the letter, and all the terms for that letter pop
 up).. but for some letters there are no terms. so i just wanted to echo
out
 a simple no terms message or something. in any case, i need to check if
 there are no results from a mysql query (an error won't be returned).

 thanks ..

 -jon





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




RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Aaron Wolski
My client is the one doing the setup of accounts.

How would the account holder know of his password before it got
encrypted?

Hense the email.

Aaron

-Original Message-
From: Peter Beckman [mailto:beckman;purplecow.com] 
Sent: November 15, 2002 12:35 PM
To: Aaron Wolski
Cc: 'Jason Vincent'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?

Why not encrypt the password in the DB?  If they lose their password, it
cannot be sent to them.  They chose it, so it doesn't need to be sent to
them in their email.  If they lose it, it is changed, and they have to
change it again.  That way, only if they are stupid do they have an
extra
step.

The passwords in the DB are encrypted, so only if someone gets a hold of
the DB can the passwords be cracked by brute force.

md5 would work fine for this.  It is the same security that FreeBSD uses
in
their password file.

Peter

On Fri, 15 Nov 2002, Aaron Wolski wrote:

 Well.

 Its not what they want.. it what one of their clients want (very big
 corporation with very unrealistic security standards - you'd think
they
 were NASA or something *grumble*)

 Their thought is that someone could hack the received email, login to
 the store using the publically displayed logins details and reek havoc
 on the store, etc.

 *shrugs* Sadly this isn't open for debate as a solutions IS required.

 Any thoughts?

 Aaron

 -Original Message-
 From: Jason Vincent [mailto:jayv;nortelnetworks.com]
 Sent: November 15, 2002 11:42 AM
 To: Aaron Wolski; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?

 Why email? If the Admin tool uses SSL, that is all you need.
 Regards,
 J

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: Friday, November 15, 2002 11:39 AM
 To: 'Aaron Wolski'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?

 Just thinking here..

 PGP is not an option as it would mean EACH user being setup would need
 the company's public key to decrypt. Not possible as they setup a few
 hundred accounts each month.
 Hmm.. anything else?
 Argh :(
 Aaron
 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: November 15, 2002 11:36 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Email Encryption?
 OFFTOPIC

 Sorry for the off topic guys..

 But I've just been informed that an application we developed for a
 client whereby they use an Admin tool to setup user accounts into
their
 store needs to have the login (username and password) encrypted.

 I am thinking PGP for this but to be honest I've never really worked
 with PGP and wouldn't have the first clue.

 Does anyone have any experience with this or can offer and advise at
 all?

 Again, sorry for the OT discussion.

 Aaron

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



---
Peter BeckmanSystems Engineer, Fairfax Cable Access
Corporation
[EMAIL PROTECTED]
http://www.purplecow.com/

---


-- 
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[2]: [PHP-DB] Email Encryption?

2002-11-15 Thread Damian Harouff
If they have real security standards (though you said unrealistic),
they would realize that good encryption isn't decryptable, only
comparable. Or try and make them realize as such.

AW My client is the one doing the setup of accounts.

AW How would the account holder know of his password before it got
AW encrypted?

AW Hense the email.

AW Aaron

AW -Original Message-
AW From: Peter Beckman [mailto:beckman;purplecow.com] 
AW Sent: November 15, 2002 12:35 PM
AW To: Aaron Wolski
AW Cc: 'Jason Vincent'; [EMAIL PROTECTED]
AW Subject: RE: [PHP-DB] Email Encryption?

AW Why not encrypt the password in the DB?  If they lose their password, it
AW cannot be sent to them.  They chose it, so it doesn't need to be sent to
AW them in their email.  If they lose it, it is changed, and they have to
AW change it again.  That way, only if they are stupid do they have an
AW extra
AW step.

AW The passwords in the DB are encrypted, so only if someone gets a hold of
AW the DB can the passwords be cracked by brute force.

AW md5 would work fine for this.  It is the same security that FreeBSD uses
AW in
AW their password file.

AW Peter

AW On Fri, 15 Nov 2002, Aaron Wolski wrote:

 Well.

 Its not what they want.. it what one of their clients want (very big
 corporation with very unrealistic security standards - you'd think
AW they
 were NASA or something *grumble*)

 Their thought is that someone could hack the received email, login to
 the store using the publically displayed logins details and reek havoc
 on the store, etc.

 *shrugs* Sadly this isn't open for debate as a solutions IS required.

 Any thoughts?

 Aaron

 -Original Message-
 From: Jason Vincent [mailto:jayv;nortelnetworks.com]
 Sent: November 15, 2002 11:42 AM
 To: Aaron Wolski; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?

 Why email? If the Admin tool uses SSL, that is all you need.
 Regards,
 J

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: Friday, November 15, 2002 11:39 AM
 To: 'Aaron Wolski'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?

 Just thinking here..

 PGP is not an option as it would mean EACH user being setup would need
 the company's public key to decrypt. Not possible as they setup a few
 hundred accounts each month.
 Hmm.. anything else?
 Argh :(
 Aaron
 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: November 15, 2002 11:36 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Email Encryption?
 OFFTOPIC

 Sorry for the off topic guys..

 But I've just been informed that an application we developed for a
 client whereby they use an Admin tool to setup user accounts into
AW their
 store needs to have the login (username and password) encrypted.

 I am thinking PGP for this but to be honest I've never really worked
 with PGP and wouldn't have the first clue.

 Does anyone have any experience with this or can offer and advise at
 all?

 Again, sorry for the OT discussion.

 Aaron

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


AW 
AW ---
AW Peter BeckmanSystems Engineer, Fairfax Cable Access
AW Corporation
AW [EMAIL PROTECTED]
AW http://www.purplecow.com/
AW 
AW ---


AW -- 
AW PHP Database Mailing List (http://www.php.net/)
AW 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] Email Encryption?

2002-11-15 Thread Jason Vincent
What does the admin know about the client?  Do their clients have account
numbers for instance?  If so, you could send them and email saying your user
name is the same as your last name, and your password is the same as your
user account number (an obviously don't disclose the account number in the
email)- and have the app force them to change it the first time they log in.
This way, even if the hacker intercepted the email, they would not know the
clients account number from it and therefore not be able to hack in.  Upon
change, have the app email the client (assuming you have their email address
on file) and let then know that someone has changed their account number,
and if it wasn't them... blah blah

Regards,

J


-Original Message-
From: Aaron Wolski [mailto:aaronjw;martekbiz.com] 
Sent: Friday, November 15, 2002 1:18 PM
To: 'Peter Beckman'
Cc: Vincent, Jason [BRAM:1334:EXCH]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?


My client is the one doing the setup of accounts.

How would the account holder know of his password before it got encrypted?

Hense the email.

Aaron

-Original Message-
From: Peter Beckman [mailto:beckman;purplecow.com] 
Sent: November 15, 2002 12:35 PM
To: Aaron Wolski
Cc: 'Jason Vincent'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Email Encryption?

Why not encrypt the password in the DB?  If they lose their password, it
cannot be sent to them.  They chose it, so it doesn't need to be sent to
them in their email.  If they lose it, it is changed, and they have to
change it again.  That way, only if they are stupid do they have an extra
step.

The passwords in the DB are encrypted, so only if someone gets a hold of the
DB can the passwords be cracked by brute force.

md5 would work fine for this.  It is the same security that FreeBSD uses in
their password file.

Peter

On Fri, 15 Nov 2002, Aaron Wolski wrote:

 Well.

 Its not what they want.. it what one of their clients want (very big 
 corporation with very unrealistic security standards - you'd think
they
 were NASA or something *grumble*)

 Their thought is that someone could hack the received email, login to 
 the store using the publically displayed logins details and reek havoc 
 on the store, etc.

 *shrugs* Sadly this isn't open for debate as a solutions IS required.

 Any thoughts?

 Aaron

 -Original Message-
 From: Jason Vincent [mailto:jayv;nortelnetworks.com]
 Sent: November 15, 2002 11:42 AM
 To: Aaron Wolski; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?

 Why email? If the Admin tool uses SSL, that is all you need. Regards,
 J

 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: Friday, November 15, 2002 11:39 AM
 To: 'Aaron Wolski'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?

 Just thinking here..

 PGP is not an option as it would mean EACH user being setup would need 
 the company's public key to decrypt. Not possible as they setup a few 
 hundred accounts each month. Hmm.. anything else?
 Argh :(
 Aaron
 -Original Message-
 From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
 Sent: November 15, 2002 11:36 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Email Encryption?
 OFFTOPIC

 Sorry for the off topic guys..

 But I've just been informed that an application we developed for a 
 client whereby they use an Admin tool to setup user accounts into
their
 store needs to have the login (username and password) encrypted.

 I am thinking PGP for this but to be honest I've never really worked 
 with PGP and wouldn't have the first clue.

 Does anyone have any experience with this or can offer and advise at 
 all?

 Again, sorry for the OT discussion.

 Aaron

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



---
Peter BeckmanSystems Engineer, Fairfax Cable Access
Corporation
[EMAIL PROTECTED]
http://www.purplecow.com/

---


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





RE: [PHP-DB] phpmysqladmin

2002-11-15 Thread alex hogan
Matt,

The url is;
www.phpmyadmin.net

You are right, it is a web interface for MySQL.


alex

 -Original Message-
 From: Matt Giddings [mailto:cen10761;centurytel.net]
 Sent: Friday, November 15, 2002 11:18 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] phpmysqladmin
 
 Anybody have the url for phpmysqladmin?  I believe phpmysqladmin is a
 web interface for mysql.  I'm sure someone will correct me if I'm
wrong.
 : )
 
 Thanks,
 Matt
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.399 / Virus Database: 226 - Release Date: 10/9/2002
 
 
 
 --
 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




[PHP-DB] I just wanna say...

2002-11-15 Thread Brett Lathrope

I see people post questions here, get answers, and never even acknowledge
anyone responded.

Well I just wanna say, Thanks guys.  I've posted questions here twice
now...my last a couple of days ago.  Both times I received numerous, almost
instantaneous, knowledgeable, and extremely helpful responses.

Thanks!

Brett


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




Re: [PHP-DB] I just wanna say...

2002-11-15 Thread Chris Payne
Here here, couldn't agree more.

Sometimes I get the answers I need but am too tired to reply then the next
day I get so caught up in everyday life sometimes forget to say thanks
myself but this list is a lifesaver and is a godsend to many of us either
just learning PHP/MySQL or who want to get into it alittle deeper.

Thanks everyone.

Chris



 I see people post questions here, get answers, and never even acknowledge
 anyone responded.

 Well I just wanna say, Thanks guys.  I've posted questions here twice
 now...my last a couple of days ago.  Both times I received numerous,
almost
 instantaneous, knowledgeable, and extremely helpful responses.

 Thanks!

 Brett


 --
 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 just wanna say...

2002-11-15 Thread Aaron Wolski
Yes indeed!

We often forget cause we're so busy with our own projects. However, so
are the people who helped us out originally.

Thanks to you - you know who you are!

*sings* Lets drink to the hard working people Lets drink to the good
(PHP) and the evil (ASP/VB) 

haha :)

Aaron

-Original Message-
From: Chris Payne [mailto:chris;planetoxygene.com] 
Sent: November 15, 2002 2:36 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] I just wanna say...

Here here, couldn't agree more.

Sometimes I get the answers I need but am too tired to reply then the
next
day I get so caught up in everyday life sometimes forget to say thanks
myself but this list is a lifesaver and is a godsend to many of us
either
just learning PHP/MySQL or who want to get into it alittle deeper.

Thanks everyone.

Chris



 I see people post questions here, get answers, and never even
acknowledge
 anyone responded.

 Well I just wanna say, Thanks guys.  I've posted questions here
twice
 now...my last a couple of days ago.  Both times I received numerous,
almost
 instantaneous, knowledgeable, and extremely helpful responses.

 Thanks!

 Brett


 --
 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




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




RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Peter Beckman
At the time of the account setup, you'll have the unencrypted and encrypted
password.  Send the email before it gets encrypted.

Still, this is a little silly, since the email is unencrypted.  I guess you
could base64 encode the email, but that'd take an extra step.

Oooh, what about this?  Send an email that takes you to an https: page that
only can be viewed by entering a valid code sent in another email?  This
https page, given the right code, will give you your username and password?

The two separate emails provides a bit of obscurity, and the password is
always encrypted.

On the server side, if these accounts would only be accessed from certain
IP blocks, you can block other requests.

Peter

On Fri, 15 Nov 2002, Aaron Wolski wrote:

 My client is the one doing the setup of accounts.

 How would the account holder know of his password before it got
 encrypted?

 Hense the email.

 Aaron

 -Original Message-
 From: Peter Beckman [mailto:beckman;purplecow.com]
 Sent: November 15, 2002 12:35 PM
 To: Aaron Wolski
 Cc: 'Jason Vincent'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Email Encryption?

 Why not encrypt the password in the DB?  If they lose their password, it
 cannot be sent to them.  They chose it, so it doesn't need to be sent to
 them in their email.  If they lose it, it is changed, and they have to
 change it again.  That way, only if they are stupid do they have an
 extra
 step.

 The passwords in the DB are encrypted, so only if someone gets a hold of
 the DB can the passwords be cracked by brute force.

 md5 would work fine for this.  It is the same security that FreeBSD uses
 in
 their password file.

 Peter

 On Fri, 15 Nov 2002, Aaron Wolski wrote:

  Well.
 
  Its not what they want.. it what one of their clients want (very big
  corporation with very unrealistic security standards - you'd think
 they
  were NASA or something *grumble*)
 
  Their thought is that someone could hack the received email, login to
  the store using the publically displayed logins details and reek havoc
  on the store, etc.
 
  *shrugs* Sadly this isn't open for debate as a solutions IS required.
 
  Any thoughts?
 
  Aaron
 
  -Original Message-
  From: Jason Vincent [mailto:jayv;nortelnetworks.com]
  Sent: November 15, 2002 11:42 AM
  To: Aaron Wolski; [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] Email Encryption?
 
  Why email? If the Admin tool uses SSL, that is all you need.
  Regards,
  J
 
  -Original Message-
  From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
  Sent: Friday, November 15, 2002 11:39 AM
  To: 'Aaron Wolski'; [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] Email Encryption?
 
  Just thinking here..
 
  PGP is not an option as it would mean EACH user being setup would need
  the company's public key to decrypt. Not possible as they setup a few
  hundred accounts each month.
  Hmm.. anything else?
  Argh :(
  Aaron
  -Original Message-
  From: Aaron Wolski [mailto:aaronjw;martekbiz.com]
  Sent: November 15, 2002 11:36 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Email Encryption?
  OFFTOPIC
 
  Sorry for the off topic guys..
 
  But I've just been informed that an application we developed for a
  client whereby they use an Admin tool to setup user accounts into
 their
  store needs to have the login (username and password) encrypted.
 
  I am thinking PGP for this but to be honest I've never really worked
  with PGP and wouldn't have the first clue.
 
  Does anyone have any experience with this or can offer and advise at
  all?
 
  Again, sorry for the OT discussion.
 
  Aaron
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 
 ---
 Peter BeckmanSystems Engineer, Fairfax Cable Access
 Corporation
 [EMAIL PROTECTED]
 http://www.purplecow.com/
 
 ---


 --
 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


---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[EMAIL PROTECTED] http://www.purplecow.com/
---


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




Re: [PHP-DB] phpmysqladmin

2002-11-15 Thread vze2f6h6
Here you go.

www.phpmyadmin.net
 
 From: Matt Giddings [EMAIL PROTECTED]
 Date: 2002/11/15 Fri PM 12:17:44 EST
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] phpmysqladmin
 
 Anybody have the url for phpmysqladmin?  I believe phpmysqladmin is a
 web interface for mysql.  I'm sure someone will correct me if I'm wrong.
 : )
 
 Thanks,
 Matt 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.399 / Virus Database: 226 - Release Date: 10/9/2002
  
 
 
 -- 
 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




[PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Hutchins, Richard
I'm having problems with a query. The query as it reads in my code is:

$sql_element_low = UPDATE $table SET medialow=NULL WHERE
.$_POST[tbl].contentID=.$_POST[id].;

All of the varibles get passed as expected. I know this because if I echo
the SQL out to the page, I get:

UPDATE levelone SET medialow=NULL WHERE 1contentID=1

When I type the echoed SQL directly into the MySQL command line, the query
executed just fine. However, when I try to let the code execute the query,
nothing happens. No, mysql_error(), nothing. 

All of the surrounding code is found below. $sql_media fires just fine and
deletes what it is supposed to. However, when the $sql_element_low query
gets called, it'll echo out just fine, but won't execute.

if(isset($_POST[delete][medialow])){
$sql_media = DELETE FROM media WHERE
mediaID=.$_POST[mediaID][0].;
//echo $sql_media./br;

mysql_query($sql_media) or die(mysql_error());

$table = tableNumToName($_POST[tbl]);

$sql_element_low = UPDATE $table SET medialow=NULL WHERE
.$_POST[tbl].contentID=.$_POST[id].;
echo $sql_element_low.br;

mysql_query($sql_element_low) or die(mysql_error());
}

Any ideas?

Thanks,
Rich

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




Re: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Marco Tabini
I don't think you can have column names that start with a number. Are
you sure you didn't mean to write:


$sql_element_low = UPDATE $table SET medialow=NULL WHERE
.$table.contentID=.$_POST[id].;

Otherwise, try adding a simple

die (mysql_error());

after the offending line and see what PHP tells you.


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers

Come visit us at http://www.phparch.com!

---BeginMessage---
I'm having problems with a query. The query as it reads in my code is:

$sql_element_low = UPDATE $table SET medialow=NULL WHERE
.$_POST[tbl].contentID=.$_POST[id].;

All of the varibles get passed as expected. I know this because if I echo
the SQL out to the page, I get:

UPDATE levelone SET medialow=NULL WHERE 1contentID=1

When I type the echoed SQL directly into the MySQL command line, the query
executed just fine. However, when I try to let the code execute the query,
nothing happens. No, mysql_error(), nothing. 

All of the surrounding code is found below. $sql_media fires just fine and
deletes what it is supposed to. However, when the $sql_element_low query
gets called, it'll echo out just fine, but won't execute.

if(isset($_POST[delete][medialow])){
$sql_media = DELETE FROM media WHERE
mediaID=.$_POST[mediaID][0].;
//echo $sql_media./br;

mysql_query($sql_media) or die(mysql_error());

$table = tableNumToName($_POST[tbl]);

$sql_element_low = UPDATE $table SET medialow=NULL WHERE
.$_POST[tbl].contentID=.$_POST[id].;
echo $sql_element_low.br;

mysql_query($sql_element_low) or die(mysql_error());
}

Any ideas?

Thanks,
Rich

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



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


RE: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Marco Tabini
Uhm... are you sure it's not working? It's an update statement, maybe
the row has already the NULL value before you execute the query?

Otherwise, everything seems to be in order... sorry :-)


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers

Come visit us at http://www.phparch.com!

---BeginMessage---
Marco,

Thanks for the quick response. I'm pretty sure it's legal to have MySQL
column names that begin with numbers. I do plenty of other queries on the
same database without incident. You might be thinking of the rule in PHP
where variables can't start with numbers. Found that one out the hard way.
By that time it was too late to change the column names to make writing
queries easier. Live 'n learn.

And if you look at the code I posted, there is mysql_query($sql_element_low)
or die(mysql_error()); but it does not return an error.

That's why I'm so baffled here. Everything SEEMS to be right.

 -Original Message-
 From: Marco Tabini [mailto:marcot;inicode.com]
 Sent: Friday, November 15, 2002 3:52 PM
 To: Hutchins, Richard
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Query Executes in MySQL Command Line, Not From
 PHP.
 
 
 I don't think you can have column names that start with a number. Are
 you sure you didn't mean to write:
 
 
 $sql_element_low = UPDATE $table SET medialow=NULL WHERE
 .$table.contentID=.$_POST[id].;
 
 Otherwise, try adding a simple
 
 die (mysql_error());
 
 after the offending line and see what PHP tells you.
 
 
 Marco
 -- 
 
 php|architect - The magazine for PHP Professionals
 The first monthly worldwide magazine dedicated to PHP programmers
 
 Come visit us at http://www.phparch.com!
 

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



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


RE: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Hutchins, Richard
It's definitely not working. A resulting page breaks each time the code runs
and I can see that the UPDATE operation has not taken place when I examine
the data in the database.

I know the problem is not with the resulting page because the page is built
to handle NULL and I can see that the database has not been changed where I
expect it to be.

I even changed the column definition from smallint to varchar just to see if
I was not permitted to set a smallint back to NULL, but the code didn't
perform properly even when the column was a varchar. ARGH!

Thanks for trying to help. This is so frustrating.

 -Original Message-
 From: Marco Tabini [mailto:marcot;inicode.com]
 Sent: Friday, November 15, 2002 4:14 PM
 To: Hutchins, Richard
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Query Executes in MySQL Command Line, Not From
 PHP.
 
 
 Uhm... are you sure it's not working? It's an update statement, maybe
 the row has already the NULL value before you execute the query?
 
 Otherwise, everything seems to be in order... sorry :-)
 
 
 Marco
 -- 
 
 php|architect - The magazine for PHP Professionals
 The first monthly worldwide magazine dedicated to PHP programmers
 
 Come visit us at http://www.phparch.com!
 

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




[PHP-DB] php sessions using mysql (or any db)

2002-11-15 Thread Adam Nelson
Cannot get code to work for session management on a database.  Does anyone
have tips.  It appears that the data goes into the table, but I can't get it
out.  session_start just initializes the data in the value column.:


SessionsTable definition
---

CREATE TABLE `SessionsTable` (
  `SID` varchar(32) NOT NULL default '',
  `expiration` int(11) NOT NULL default '0',
  `value` text NOT NULL,
  PRIMARY KEY  (`SID`)
) TYPE=MyISAM


mysql_sessions.inc:


?php

// Session Table

$sess_table = SessionsTable;

// Retrieve the session maximum lifetime (found in php.ini)

$lifetime = get_cfg_var(session.gc_maxlifetime);

//=
// function: mysql_session_open()
// purpose: Opens a persistent server connection and selects the
//database.
//=

function mysql_session_open($session_path, $session_name) {

  mysql_pconnect(localhost, root, )
 or die(Can't connect to MySQL server! );

  mysql_select_db(globalDB)
 or die(Can't select MySQL sessions database);

} // end mysql_session_open()

//=
// function: mysql_session_close()
// purpose: Doesn't actually do anything since the server connection is
//persistent. Keep in mind that although this function
//doesn't do anything in my particular implementation, I
//still must define it.
//=

function mysql_session_close() {

  return 1;

} // end mysql_session_close()

//=
// function: mysql_session_select()
// purpose: Reads the session data from the database
//=

function mysql_session_select($SID) {

  GLOBAL $sess_db;
  GLOBAL $sess_table;

  $query = SELECT value FROM $sess_table
  WHERE SID = '$SID' AND
  expiration  . time();

  $result = mysql_query($query);

} // end mysql_session_select()

//=
// function: mysql_session_write()
// purpose: This function writes the session data to the database. If that
SID
// already exists, then the existing data will be updated.
//=

function mysql_session_write($SID,$value) {

  GLOBAL $sess_db;
  GLOBAL $sess_table;
  GLOBAL $lifetime;

  $expiration = time() + $lifetime;

  $query = INSERT INTO $sess_table
  VALUES('$SID', '$expiration', '$value');

  $result = mysql_query($query);

  if (! $result) :

   $query = UPDATE $sess_table SET
   expiration = '$expiration',
   value = '$value' WHERE
   SID = '$SID' AND expiration . time();
   $result = mysql_query($query);

  endif;

} // end mysql_session_write()

//=
// function: mysql_session_destroy()
// purpose: deletes all session information having input SID (only one row)
//=

function mysql_session_destroy($sessionID) {

  GLOBAL $sess_table;

  $query = DELETE FROM $sess_table
  WHERE SID = '$sessionID';
  $result = mysql_query($query);

} // end mysql_session_destroy()

//=
// function: mysql_session_garbage_collect()
// purpose: deletes all sessions that have expired.
//=

function mysql_session_garbage_collect($lifetime) {

  GLOBAL $sess_table;

  $query = DELETE FROM $sess_table
  WHERE sess_expiration  .time() - $lifetime;
  $result = mysql_query($query);

  return mysql_affected_rows($result);

} // end mysql_session_garbage_collect()

?

End of mysql_sessions.inc


---
1-1.php - The first page
---

?
INCLUDE(mysql_sessions.inc);

session_set_save_handler(mysql_session_open, mysql_session_close,
  mysql_session_select, mysql_session_write,
  mysql_session_destroy,
  mysql_session_garbage_collect);

// create a new session
session_start();

// register a session-variable
session_register(bgcolor);

// Assign a value to the session-variable
$_SESSION['bgcolor'] = #8080ff;
?
html
head
titleSession Example #1/title
/head

body bgcolor=?=$_SESSION['bgcolor']? text=#00 link=#00
vlink=#00 alink=#00

Welcome to a session-enabled page! The background color on the next page
will be set to a stylish blue.p
a href = 1-2.phpGo to another session-enabled page/a.
/body
/html

---
End of 1-1.php
---

---
1-2.php - To confirm that the session worked
---
?
INCLUDE(mysql_sessions.inc);

session_set_save_handler(mysql_session_open, mysql_session_close,
  mysql_session_select, mysql_session_write,
  mysql_session_destroy,
  mysql_session_garbage_collect);

// Resume session created in Listing 1-2
session_start();

?

html
head
titleSession Example #1/title
/head

body bgcolor=?=$_SESSION['bgcolor']? text=#00 link=#808040
vlink=#606060 alink=#808000

?

// Display the value of the $bgcolor variable.
printf (The persistent background color is: %s br\n,
$_SESSION['bgcolor']);
?

/body
/html





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

RE: [PHP-DB] Query Executes ... SOLVED

2002-11-15 Thread Hutchins, Richard
How do you know when it's 4:30 on a Friday afternoon? When you change the
value of a column then reset it to its original value further down the page.

Yup, brain fart. That's what it comes down to.

Time to go kill that errant brain cell with a nice Friday afternoon cocktail
(or three of four).


 -Original Message-
 From: Hutchins, Richard [mailto:Richard.Hutchins;GetingeCastle.com]
 Sent: Friday, November 15, 2002 4:31 PM
 To: 'Marco Tabini'
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Query Executes in MySQL Command Line, Not From
 PHP.
 
 
 It's definitely not working. A resulting page breaks each 
 time the code runs
 and I can see that the UPDATE operation has not taken place 
 when I examine
 the data in the database.
 
 I know the problem is not with the resulting page because the 
 page is built
 to handle NULL and I can see that the database has not been 
 changed where I
 expect it to be.
 
 I even changed the column definition from smallint to varchar 
 just to see if
 I was not permitted to set a smallint back to NULL, but the 
 code didn't
 perform properly even when the column was a varchar. ARGH!
 
 Thanks for trying to help. This is so frustrating.
 
  -Original Message-
  From: Marco Tabini [mailto:marcot;inicode.com]
  Sent: Friday, November 15, 2002 4:14 PM
  To: Hutchins, Richard
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] Query Executes in MySQL Command Line, Not From
  PHP.
  
  
  Uhm... are you sure it's not working? It's an update 
 statement, maybe
  the row has already the NULL value before you execute the query?
  
  Otherwise, everything seems to be in order... sorry :-)
  
  
  Marco
  -- 
  
  php|architect - The magazine for PHP Professionals
  The first monthly worldwide magazine dedicated to PHP programmers
  
  Come visit us at http://www.phparch.com!
  
 
 -- 
 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] php sessions using mysql (or any db)

2002-11-15 Thread Rasmus Lerdorf
 CREATE TABLE `SessionsTable` (
   `SID` varchar(32) NOT NULL default '',

This doesn't need to be a varchar.  The sid will always be 32 chars, so
make it a char(32)

   `expiration` int(11) NOT NULL default '0',

I would suggest using a timestamp type here so MySQL will handle
updating it for you automatically.

 function mysql_session_open($session_path, $session_name) {

   mysql_pconnect(localhost, root, )
  or die(Can't connect to MySQL server! );

   mysql_select_db(globalDB)
  or die(Can't select MySQL sessions database);

 } // end mysql_session_open()

You need to return true; at the end of this.

 function mysql_session_close() {

   return 1;

No, use return true;

 function mysql_session_select($SID) {

   GLOBAL $sess_db;
   GLOBAL $sess_table;

   $query = SELECT value FROM $sess_table
   WHERE SID = '$SID' AND
   expiration  . time();

   $result = mysql_query($query);

 } // end mysql_session_select()

Uh, you need to return the actual value here or an empty string on an
error.

 function mysql_session_write($SID,$value) {

   GLOBAL $sess_db;
   GLOBAL $sess_table;
   GLOBAL $lifetime;

   $expiration = time() + $lifetime;

   $query = INSERT INTO $sess_table
   VALUES('$SID', '$expiration', '$value');

   $result = mysql_query($query);

   if (! $result) :

$query = UPDATE $sess_table SET
expiration = '$expiration',
value = '$value' WHERE
SID = '$SID' AND expiration . time();
$result = mysql_query($query);

   endif;

 } // end mysql_session_write()

Again, you *must* return true; on a sucessful write.

 function mysql_session_destroy($sessionID) {

   GLOBAL $sess_table;

   $query = DELETE FROM $sess_table
   WHERE SID = '$sessionID';
   $result = mysql_query($query);

 } // end mysql_session_destroy()

return true;

-Rasmus


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




RE: [PHP-DB] phpmysqladmin

2002-11-15 Thread Matt Giddings
Thanks to all that answered my question.

Matt

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:vze2f6h6;verizon.net]
 Sent: Friday, November 15, 2002 3:14 PM
 To: Matt Giddings; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] phpmysqladmin
 
 Here you go.
 
 www.phpmyadmin.net
 
  From: Matt Giddings [EMAIL PROTECTED]
  Date: 2002/11/15 Fri PM 12:17:44 EST
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] phpmysqladmin
 
  Anybody have the url for phpmysqladmin?  I believe phpmysqladmin is
a
  web interface for mysql.  I'm sure someone will correct me if I'm
wrong.
  : )
 
  Thanks,
  Matt
 
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.399 / Virus Database: 226 - Release Date: 10/9/2002
 
 
 
  --
  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
 
 
 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.399 / Virus Database: 226 - Release Date: 10/9/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.399 / Virus Database: 226 - Release Date: 10/9/2002
 


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




[PHP-DB] database update question

2002-11-15 Thread chip . wiegand
I have a database with several hundred entries of file names that end with
.pdf. I have converted
all those docs to .zip, now I need to change all the entries in the
database to .zip. I tried to use
update table_name set col_name='%.zip' where col_name like '%.pdf'  id
= '11'
but of course that changed the file name for id 11 to %.zip. Is there a way
to change all the
entries from .pdf to .zip without writing an update statement for each
individual row?

--
Chip Wiegand
Computer Services
Simrad, Inc
www.simradusa.com
[EMAIL PROTECTED]

There is no reason anyone would want a computer in their home.
 --Ken Olson, president, chairman and founder of Digital Equipment
Corporation, 1977
 (They why do I have 8? Somebody help me!)



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




Re: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Peter Beckman
Can you post the explain levelone here?  One thought is that 1contentID
is a char or varchar instead of an int.  Then again, if it were, that exact
code shouldn't have worked.

Are you sure you are doing the query using $sql_element_low and not
something else?  You may be echoing it but are you actually using the query
to execute, or did you copy the mysql_query() command from another line and
forget to change the var?

Also, I hate . and ., makes for messy life.  Try this:

$sql_element_low = UPDATE {$table} set medialow=NULL WHERE 
{$_POST['tbl']}contentID={$_POST['id']};

Also, does medialow have a unique index on it?  This could cause it to
fail.  Or is medialow defined as NOT NULL?

Peter

On Fri, 15 Nov 2002, Hutchins, Richard wrote:

 I'm having problems with a query. The query as it reads in my code is:

 $sql_element_low = UPDATE $table SET medialow=NULL WHERE
 .$_POST[tbl].contentID=.$_POST[id].;

 All of the varibles get passed as expected. I know this because if I echo
 the SQL out to the page, I get:

 UPDATE levelone SET medialow=NULL WHERE 1contentID=1

 When I type the echoed SQL directly into the MySQL command line, the query
 executed just fine. However, when I try to let the code execute the query,
 nothing happens. No, mysql_error(), nothing.

 All of the surrounding code is found below. $sql_media fires just fine and
 deletes what it is supposed to. However, when the $sql_element_low query
 gets called, it'll echo out just fine, but won't execute.

   if(isset($_POST[delete][medialow])){
   $sql_media = DELETE FROM media WHERE
 mediaID=.$_POST[mediaID][0].;
   //echo $sql_media./br;

   mysql_query($sql_media) or die(mysql_error());

   $table = tableNumToName($_POST[tbl]);

   $sql_element_low = UPDATE $table SET medialow=NULL WHERE
 .$_POST[tbl].contentID=.$_POST[id].;
   echo $sql_element_low.br;

   mysql_query($sql_element_low) or die(mysql_error());
   }

 Any ideas?

 Thanks,
 Rich

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


---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[EMAIL PROTECTED] http://www.purplecow.com/
---


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




Re: [PHP-DB] database update question

2002-11-15 Thread Brad Bonkoski
If you wish to update all of them, then just eliminate the id condition.

[EMAIL PROTECTED] wrote:

 I have a database with several hundred entries of file names that end with
 .pdf. I have converted
 all those docs to .zip, now I need to change all the entries in the
 database to .zip. I tried to use
 update table_name set col_name='%.zip' where col_name like '%.pdf'  id
 = '11'
 but of course that changed the file name for id 11 to %.zip. Is there a way
 to change all the
 entries from .pdf to .zip without writing an update statement for each
 individual row?

 --
 Chip Wiegand
 Computer Services
 Simrad, Inc
 www.simradusa.com
 [EMAIL PROTECTED]

 There is no reason anyone would want a computer in their home.
  --Ken Olson, president, chairman and founder of Digital Equipment
 Corporation, 1977
  (They why do I have 8? Somebody help me!)

 --
 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] database update question

2002-11-15 Thread Peter Beckman
you could do substring

update table_name set col_name=concat(substring_index(col_name,.pdf,1),.zip) where 
col_name like %.pdf

What does this do?  From the man page:

SUBSTRING_INDEX(str,delim,count)
Returns the substring from string str before count occurrences of the
delimiter delim. If count is positive, everything to the left of the
final delimiter (counting from the left) is returned. If count is
negative, everything to the right of the final delimiter (counting from
the right) is returned:

mysql SELECT SUBSTRING_INDEX('www.mysql.com', '.', 2);
- 'www.mysql'
mysql SELECT SUBSTRING_INDEX('www.mysql.com', '.', -2);
- 'mysql.com'

This function is multi-byte safe.


What does it do here?

mysql select concat(substring_index(filename.pdf,.pdf,1),.zip);
+-+
| concat(substring_index(filename.pdf,.pdf,1),.zip) |
+-+
| filename.zip|
+-+

The ONLY problem you will have with this is if the filename is something like this:

filename.pdffile.pdf

This code will rename it filename.zip, not filename.pdffile.zip as expected.

Peter

On Fri, 15 Nov 2002, Brad Bonkoski wrote:

 If you wish to update all of them, then just eliminate the id condition.

 [EMAIL PROTECTED] wrote:

  I have a database with several hundred entries of file names that end with
  .pdf. I have converted
  all those docs to .zip, now I need to change all the entries in the
  database to .zip. I tried to use
  update table_name set col_name='%.zip' where col_name like '%.pdf'  id
  = '11'
  but of course that changed the file name for id 11 to %.zip. Is there a way
  to change all the
  entries from .pdf to .zip without writing an update statement for each
  individual row?
 
  --
  Chip Wiegand
  Computer Services
  Simrad, Inc
  www.simradusa.com
  [EMAIL PROTECTED]
 
  There is no reason anyone would want a computer in their home.
   --Ken Olson, president, chairman and founder of Digital Equipment
  Corporation, 1977
   (They why do I have 8? Somebody help me!)
 
  --
  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


---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[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] If conditional behaviour

2002-11-15 Thread Bradley Crockett
AT http://crockett.ca/joinoptional.php I have a page posted. PHP isn't set up on the 
server, so I've posted a screenshot of what it looks like at 
http://crockett.ca/joinoptionalrendered.bmp (1/2 MB, sorry). For some reason, it wants 
to repeat 'Victoria' in the form.

If I comment out the If conditional:

// if ($city = Victoria) {
//  echo selected ;
// }

..the problem goes away and the different cities appear as expected.

The result of the query is at http://crockett.ca/queryresults.txt

Can someone point me in the right direction?

Brad Crockett
Duncan BC


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




Re: [PHP-DB] If conditional behaviour

2002-11-15 Thread Mihail Bota
Did you try $city==Victoria ?

On Fri, 15 Nov 2002, Bradley Crockett wrote:

 AT http://crockett.ca/joinoptional.php I have a page posted. PHP isn't set up on the 
server, so I've posted a screenshot of what it looks like at 
http://crockett.ca/joinoptionalrendered.bmp (1/2 MB, sorry). For some reason, it 
wants to repeat 'Victoria' in the form.

 If I comment out the If conditional:

   // if ($city = Victoria) {
   //  echo selected ;
   // }

 ..the problem goes away and the different cities appear as expected.

 The result of the query is at http://crockett.ca/queryresults.txt

 Can someone point me in the right direction?

 Brad Crockett
 Duncan BC


 --
 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] If conditional behaviour

2002-11-15 Thread Bradley Crockett
That was it.

How embarrassing.

Thanks!

On Fri, 15 Nov 2002 21:12:42 -0800 (PST), Mihail Bota wrote:
Did you try $city==Victoria ?

On Fri, 15 Nov 2002, Bradley Crockett wrote:

AT http://crockett.ca/joinoptional.php I have a page posted. PHP
isn't set up on the server, so I've posted a screenshot of what it
looks like at http://crockett.ca/joinoptionalrendered.bmp (1/2 MB,
sorry). For some reason, it wants to repeat 'Victoria' in the form.

If I comment out the If conditional:

// if ($city = Victoria) {
//  echo selected ;
// }

..the problem goes away and the different cities appear as
expected.

The result of the query is at http://crockett.ca/queryresults.txt

Can someone point me in the right direction?

Brad Crockett
Duncan BC


--
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