RE: [PHP-DB] Re: [PHP] RE: the opposite of a join?

2007-10-03 Thread Ryan Jameson \(USA\)
You can also do an outer join and look for NULLS in the key (which means
"no match"). In some cases it may be more efficient. <>< Ryan

-Original Message-
From: James Ausmus [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 03, 2007 10:00 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; php-db@lists.php.net
Subject: [PHP-DB] Re: [PHP] RE: the opposite of a join?

On 10/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hi J,
> >
> >
> > Checkout this,
> >
> >
> > SELECT * FROM tbl_company where id not in (SELECT companyID from
> > tbl_contacts)
> >
>
>
> Brilliant! This is exactly what I was looking for, and is quite 
> logical/readable!  Thanks to everyone for the ideas!
>
> J
>

No, don't do this! It is a very inefficient way to retrieve the
information you are looking for (Use a query analysis tool to check it
out yourself, if you want) - if your tables get to any larger size at
all, it will start having a noticeable performance impact on your script
(not to mention your DB) - let the DB do the hard work and use a LEFT
JOIN syntax, the database can optimize that much more efficiently. Only
if your DB doesn't support the LEFT JOIN syntax would you want to do the
above.

-James



>
>
>
>
>
> >
> >
> >
> >
> > Regards,
> > Lasitha Alawatta
> > Application Developer
> > Destinations of the World Holding Establishment P O Box: 19950 
> > Dubai, United Arab Emirates ( Ph +971 4 295 8510 (Board) / 1464 
> > (Ext.)
> > 7 Fax +971 4 295 8910
> > + [EMAIL PROTECTED]
> >
> > -Original Message-
> > From: John Pillion [mailto:[EMAIL PROTECTED] 
> > 
> On Behalf Of
> > [EMAIL PROTECTED]
> > Sent: Wednesday, October 03, 2007 2:21 PM
> > To: [EMAIL PROTECTED]; php-db@lists.php.net
> > Subject: [PHP-DB] the opposite of a join?
> >
> > I have a company table and a contacts table.  In the contacts table,

> > there is a field called "companyID" which is a link to a row in the 
> > company table.
> >
> >
> >
> > What is the easiest way to query the company table for all the 
> > company rows whose ID is NOT linked to in the contact table? 
> > Basically, the opposite of a join?
> >
> >
> >
> > Thanks
> >
> >
> >
> > J
> >
> >
> >
> > DOTW DISCLAIMER:
> >
> > This e-mail and any attachments are strictly confidential and 
> > intended for the addressee only. If you are not the named addressee 
> > you must not >
> disclose, copy or take
> > any action in reliance of this transmission and you should notify us

> > as soon as possible. If you have received it in error, please 
> > contact the message sender immediately.
> > This e-mail and any attachments are believed to be free from viruses

> > but it is your responsibility to carry out all necessary virus 
> > checks and DOTW accepts no liability in connection therewith.
> >
> > This e-mail and all other electronic (including voice) 
> > communications from the sender's company are for informational 
> > purposes only.  No such communication is intended by the sender to 
> > constitute either an electronic record or an electronic signature or

> > to constitute any agreement by the sender to conduct a transaction 
> > by electronic means.
> >
>
> >
>
>

--
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] Re: Integrated Authentication on IIS 6.0

2005-05-24 Thread Ryan Jameson \(USA\)
Okay,



Does that help?

<>< Ryan 

-Original Message-
From: JeRRy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 24, 2005 1:33 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Re: Integrated Authentication on IIS 6.0


 


Hi,I have an intranet application that I wrote in PHP that has worked
greatfor a long time. It uses integrated authentication in IIS. I'm
trying tomigrate to IIS 6 and things are mostly working. The problem I
have isthat my ODBC_CONNECT calls are not resulting in: "Login failed
for user'(null)'. Reason: Not associated with a trusted SQL Server
connection.".What it seems to tell me is it is correctly trying to make
an integratedauth connection to the database, but for some reason the
current user'scredentials aren't being passed? Does anyone have insight
into this?Thanks!<>< Ryan

 

How many times in the pass week has people been told that when they post
to this list to post code with their question?

Most people will reject to help without code displayed.

But this problem could be a code or server error but no-one can
pin-point it with 100% confidence without code sniplets or what you did.

J




-
Find local movie times and trailers on Yahoo! Movies.

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



RE: [PHP-DB] Integrated Authentication on IIS 6.0

2005-05-23 Thread Ryan Jameson \(USA\)
Well, isn't it always a minor detail that makes the difference? This
problem occurred because part of my upgrade included separating IIS and
my SQL server. Well, guess what, good ole' Microsoft has included a
"feature" that will not allow credentials to be passed from IIS to SQL
if SQL is on a different machine. DOAH! It's called the 2 hop issue and
is a problem even for their loyal ASP developers. 

Anyway apparently there are 3 solutions:

1. Set up a complex kerberos delegation configuration based on a lengthy
article from Microsnot and cross your fingers.
2. Install SQL server on your IIS machine.
3. Don't use integrated authentication.

ALL of my permissions are setup based on a domain user group. Access to
the system was added by putting a user in that group. It was a beautiful
thing until this doozy appeared. :-\

Thanks anyway. No wonder there wasn't much response.

<>< Ryan 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 1:00 PM
To: php-db@lists.php.net
Cc: Ryan Jameson (USA)
Subject: RE: [PHP-DB] Integrated Authentication on IIS 6.0

Ahh.. ok..  I was mostly doing DSNless connections.

You might want to look into the setup for your ODBC source called
"Datasource" in your example below.  That might be what's actually
passing the authentication, not PHP itself.  PHP makes a call to the
local ODBC source which in turn actually handles the connection.

Don't know if that helps, but that's the next place I'd check, unless
someone else has better insight.

-TG

= = = Original message = = =

Thanks for the response!

Yes, believe it or not it does work, or at least did on IIS 5. When I
turn on Integrated Security on the web server it causes PHP to run as
the user logged in instead of the Anonymous user. Then calling
odbc_connect with a blank username/password combination in cooperation
with a system DSN configured to use Windows Authentication caused the
connection to be made via the individual user's Windows credentials.
This behavior is eluded to in a note on the php site from "flo" :


If you don't want to specify your login credentials on your web server,
you can leave the login fields blank to use the integrated windows
security like here: 

odbc_connect("DSN=DataSource","",""); 

Make sure you have switched your system dsn to integrated security, too
! 

(works on windows machines only, of course)


My intranet application relies on this ability. My working production
server is IIS 5 on Advanced Server 2000 with PHP 5.04. My new server is
IIS 6 on Windows 2003 Server with PHP 5.04. Both are operating in ISAPI
mode. $AUTH_USER does report correctly the authenticated user on both
systems, but a call to odbc_connect on the new system gives this error:

Warning: odbc_connect() [function.odbc-connect]: SQL error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'(null)'. Reason: Not associated with a trusted SQL Server connection.,
SQL state 28000 in SQLConnect in testOdbc.php on line 3

For some reason odbc_connect on IIS 6.0 is not acting the same as it is
on IIS 5. I'm pretty sure it's a configuration problem, I just can't
find it. :-\

<>< Ryan


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 12:38 PM
To: php-db@lists.php.net
Cc: Ryan Jameson (USA)
Subject: Re: [PHP-DB] Integrated Authentication on IIS 6.0

Maybe I'm not understanding the situation properly, because I can't see
why you would have had it working under IIS5 if your configuration is
how I think it is.

Integrated authentication basically allows a workstation that's logged
into a domain to automatically pass it's credentials from the
workstation to the domain.

Using this, you can get the currently logged in userid via server
variables from IIS into PHP.

But you never get the user's password or are able to get anything into
PHP that will automatically connect you to a database or other trusted
data source.   If you connect to a web server and PHP on that server
creates a connection to a database, then PHP needs to send login
credentials (either hardcoded, pulled from another database based on the
user's ID or something, or provided by the user via a web form).  I
don't believe you can have PHP create a connection based on integrated
authentication because PHP is sort of outside the whole windows security
scheme.

You could configure the database to accept a connection from the PHP
server's IP address and nowhere else and hardcode a password into PHP,
or do other things like that.

Again, maybe I mis-assuming what your configuration is.  Mind giving us
more detail on the process you're trying to fix?   Users connects to web
server, web server makes ODBC connecti

RE: [PHP-DB] Integrated Authentication on IIS 6.0

2005-05-23 Thread Ryan Jameson \(USA\)
Here's an update. Running from a command prompt everything works fine.
Again, in ISAPI mode on IIS 6 this does not work. I just test CGI mode
with an identical result as ISAPI mode.

Here's the code that will generate the warning and fail to connect:

 

mySystemDSN is a system dsn with "With Windows NT authentication using
the network login ID." selected. This works on IIS 5.

<>< Ryan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 1:00 PM
To: php-db@lists.php.net
Cc: Ryan Jameson (USA)
Subject: RE: [PHP-DB] Integrated Authentication on IIS 6.0

Ahh.. ok..  I was mostly doing DSNless connections.

You might want to look into the setup for your ODBC source called
"Datasource" in your example below.  That might be what's actually
passing the authentication, not PHP itself.  PHP makes a call to the
local ODBC source which in turn actually handles the connection.

Don't know if that helps, but that's the next place I'd check, unless
someone else has better insight.

-TG

= = = Original message = = =

Thanks for the response!

Yes, believe it or not it does work, or at least did on IIS 5. When I
turn on Integrated Security on the web server it causes PHP to run as
the user logged in instead of the Anonymous user. Then calling
odbc_connect with a blank username/password combination in cooperation
with a system DSN configured to use Windows Authentication caused the
connection to be made via the individual user's Windows credentials.
This behavior is eluded to in a note on the php site from "flo" :


If you don't want to specify your login credentials on your web server,
you can leave the login fields blank to use the integrated windows
security like here: 

odbc_connect("DSN=DataSource","",""); 

Make sure you have switched your system dsn to integrated security, too
! 

(works on windows machines only, of course)


My intranet application relies on this ability. My working production
server is IIS 5 on Advanced Server 2000 with PHP 5.04. My new server is
IIS 6 on Windows 2003 Server with PHP 5.04. Both are operating in ISAPI
mode. $AUTH_USER does report correctly the authenticated user on both
systems, but a call to odbc_connect on the new system gives this error:

Warning: odbc_connect() [function.odbc-connect]: SQL error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'(null)'. Reason: Not associated with a trusted SQL Server connection.,
SQL state 28000 in SQLConnect in testOdbc.php on line 3

For some reason odbc_connect on IIS 6.0 is not acting the same as it is
on IIS 5. I'm pretty sure it's a configuration problem, I just can't
find it. :-\

<>< Ryan


-----Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 12:38 PM
To: php-db@lists.php.net
Cc: Ryan Jameson (USA)
Subject: Re: [PHP-DB] Integrated Authentication on IIS 6.0

Maybe I'm not understanding the situation properly, because I can't see
why you would have had it working under IIS5 if your configuration is
how I think it is.

Integrated authentication basically allows a workstation that's logged
into a domain to automatically pass it's credentials from the
workstation to the domain.

Using this, you can get the currently logged in userid via server
variables from IIS into PHP.

But you never get the user's password or are able to get anything into
PHP that will automatically connect you to a database or other trusted
data source.   If you connect to a web server and PHP on that server
creates a connection to a database, then PHP needs to send login
credentials (either hardcoded, pulled from another database based on the
user's ID or something, or provided by the user via a web form).  I
don't believe you can have PHP create a connection based on integrated
authentication because PHP is sort of outside the whole windows security
scheme.

You could configure the database to accept a connection from the PHP
server's IP address and nowhere else and hardcode a password into PHP,
or do other things like that.

Again, maybe I mis-assuming what your configuration is.  Mind giving us
more detail on the process you're trying to fix?   Users connects to web
server, web server makes ODBC connection (by what means?), etc..

-TG

= = = Original message = = =

Hi,

I have an intranet application that I wrote in PHP that has worked great
for a long time. It uses integrated authentication in IIS. I'm trying to
migrate to IIS 6 and things are mostly working. The problem I have is
that my ODBC_CONNECT calls are not resulting in: "Login failed for user
'(null)'. Reason: Not associated with a trusted SQL Server connection.".
What it seems to tell me is it is correctly trying to make an integr

RE: [PHP-DB] Integrated Authentication on IIS 6.0

2005-05-23 Thread Ryan Jameson \(USA\)
Thanks for the response!

Yes, believe it or not it does work, or at least did on IIS 5. When I
turn on Integrated Security on the web server it causes PHP to run as
the user logged in instead of the Anonymous user. Then calling
odbc_connect with a blank username/password combination in cooperation
with a system DSN configured to use Windows Authentication caused the
connection to be made via the individual user's Windows credentials.
This behavior is eluded to in a note on the php site from "flo" :


If you don't want to specify your login credentials on your web server,
you can leave the login fields blank to use the integrated windows
security like here: 

odbc_connect("DSN=DataSource","",""); 

Make sure you have switched your system dsn to integrated security, too
! 

(works on windows machines only, of course) 


My intranet application relies on this ability. My working production
server is IIS 5 on Advanced Server 2000 with PHP 5.04. My new server is
IIS 6 on Windows 2003 Server with PHP 5.04. Both are operating in ISAPI
mode. $AUTH_USER does report correctly the authenticated user on both
systems, but a call to odbc_connect on the new system gives this error:

Warning: odbc_connect() [function.odbc-connect]: SQL error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'(null)'. Reason: Not associated with a trusted SQL Server connection.,
SQL state 28000 in SQLConnect in testOdbc.php on line 3

For some reason odbc_connect on IIS 6.0 is not acting the same as it is
on IIS 5. I'm pretty sure it's a configuration problem, I just can't
find it. :-\

<>< Ryan


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 12:38 PM
To: php-db@lists.php.net
Cc: Ryan Jameson (USA)
Subject: Re: [PHP-DB] Integrated Authentication on IIS 6.0

Maybe I'm not understanding the situation properly, because I can't see
why you would have had it working under IIS5 if your configuration is
how I think it is.

Integrated authentication basically allows a workstation that's logged
into a domain to automatically pass it's credentials from the
workstation to the domain.

Using this, you can get the currently logged in userid via server
variables from IIS into PHP.

But you never get the user's password or are able to get anything into
PHP that will automatically connect you to a database or other trusted
data source.   If you connect to a web server and PHP on that server
creates a connection to a database, then PHP needs to send login
credentials (either hardcoded, pulled from another database based on the
user's ID or something, or provided by the user via a web form).  I
don't believe you can have PHP create a connection based on integrated
authentication because PHP is sort of outside the whole windows security
scheme.

You could configure the database to accept a connection from the PHP
server's IP address and nowhere else and hardcode a password into PHP,
or do other things like that.

Again, maybe I mis-assuming what your configuration is.  Mind giving us
more detail on the process you're trying to fix?   Users connects to web
server, web server makes ODBC connection (by what means?), etc..

-TG

= = = Original message = = =

Hi,

I have an intranet application that I wrote in PHP that has worked great
for a long time. It uses integrated authentication in IIS. I'm trying to
migrate to IIS 6 and things are mostly working. The problem I have is
that my ODBC_CONNECT calls are not resulting in: "Login failed for user
'(null)'. Reason: Not associated with a trusted SQL Server connection.".
What it seems to tell me is it is correctly trying to make an integrated
auth connection to the database, but for some reason the current user's
credentials aren't being passed? Does anyone have insight into this?

Thanks!
<>< Ryan

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


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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



[PHP-DB] Integrated Authentication on IIS 6.0

2005-05-23 Thread Ryan Jameson \(USA\)
Hi,

I have an intranet application that I wrote in PHP that has worked great
for a long time. It uses integrated authentication in IIS. I'm trying to
migrate to IIS 6 and things are mostly working. The problem I have is
that my ODBC_CONNECT calls are not resulting in: "Login failed for user
'(null)'. Reason: Not associated with a trusted SQL Server connection.".
What it seems to tell me is it is correctly trying to make an integrated
auth connection to the database, but for some reason the current user's
credentials aren't being passed? Does anyone have insight into this?

Thanks!
<>< Ryan

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



RE: [PHP-DB] Multiselect List

2005-05-18 Thread Ryan Jameson \(USA\)
That's not the problem. The problem is referring to the listbox via
javascript. It doesn't like the format: formName.listBoxName[].value it
has no problem with formName.listBoxName.value but then PHP doesn't seem
to handle it correctly.
 
<>< Ryan



From: Dimiter Ivanoff [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 18, 2005 12:25 PM
To: Ryan Jameson (USA)
Subject: Re: [PHP-DB] Multiselect List


Place the countries in array.
Name the select with your array name.
 

 
and for the  use as value the keys from the array.Where your
keys may be the IDs of the countires from the db.

"Ryan Jameson (USA)" <[EMAIL PROTECTED]> wrote:

Hey Guys,

I'm populating a multiselect list with countries from my
database. PHP
seems to require the name contain array brackets, ie. myName[].
The
problem I'm having is referring to the select list via
javascript when
the name contains the brackets. Anyone know how?

Thanks.
<>< Ryan

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





How much free photo storage do you get? Store your holiday snaps for
FREE with Yahoo! Photos. Get Yahoo! Photos
<http://us.rd.yahoo.com/mail/uk/taglines/default/photos/*http://uk.photo
s.yahoo.com/> 


[PHP-DB] Multiselect List

2005-05-18 Thread Ryan Jameson \(USA\)
Hey Guys,

I'm populating a multiselect list with countries from my database. PHP
seems to require the name contain array brackets, ie. myName[]. The
problem I'm having is referring to the select list via javascript when
the name contains the brackets. Anyone know how?

Thanks.
<>< Ryan

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



RE: [PHP-DB] Variable Variable Array

2005-03-10 Thread Ryan Jameson \(USA\)
Dynamic Variable sounds good. :-) I use them all the time, and they are
often necessary. Probably not in this case though, I like to throw them
in to confuse the newbs.. :-) J/K

<>< Ryan

-Original Message-
From: Martin Norland [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 1:53 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Variable Variable Array

Evert|Rooftop Solutions wrote:
> Ryan Jameson (USA) wrote:
> 
>> I've been using "variable variables" for years with PHP.
>>
> I'm not really sure this is really good practice. Sure, php allows it 
> but I think you should try to avoid them.
[snip]
It's excellent practice to use dynamic variables* when you need them. 
There are simply no practical ways around them in many cases, and they
can make cleaner and shorter code in many many places.

For truly dynamic pieces of code, there's really just no other way
(creating an arbitrary class object for an arbitrary database table and
calling common methods (e.g. validate_data(), add()) on said classes.

Of course, when you're doing things like this, you need to make sure
you're sanity checking your data that much more, as you can get into
namespace issues if you aren't careful.

but if you're careful, you can get fun scary things like this!

$this->{$this->form} = new $this->form;

or this!

$this->result[$table_name][$view_name] =
${"{$table_name}{$view_name}"}->add($view_data);

... be sure to comment your code :)

* Note: I call them dynamic variables, I have no clue if that's the
'accepted' term for them.  Makes sense to me, though.

cheers,
--
- Martin Norland, Sys Admin / Database / Web Developer, International
Outreach x3257 The opinion(s) contained within this email do not
necessarily represent those of St. Jude Children's Research Hospital.

--
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] Variable Variable Array

2005-03-10 Thread Ryan Jameson \(USA\)
"echo ${$VarName}['second'];
is what you want - you want to be very clear what order these things
need to be analyzed in, especially when dealing with arrays and the
likes." 

That was the problem!!! Thanks guys.

<>< Ryan

-Original Message-
From: Martin Norland [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 12:19 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Variable Variable Array

Ryan Jameson (USA) wrote:
> Hi Folks,
> 
> I've been using "variable variables" for years with PHP.
> 
> $var = "myVarName";
> $$var = "Some Val";
> 
> echo $myVarName; //outputs "Some Val"
[snip]
> Example:
> 
> $var['first']='bob';
> $var['second']='frank';
> 
> $varName = "myVarName";
> $$varName = $var;
> 
> echo $$varName['second']; //should output "frank" but doesn't. :-\
> <-
> echo $var['second']; //should output "frank" works fine.

Try adding
$frank = 'woopsie!';
to the top of your script and running it.
-
echo ${$VarName}['second'];
is what you want - you want to be very clear what order these things
need to be analyzed in, especially when dealing with arrays and the
likes.

Cheers,
--
- Martin Norland, Sys Admin / Database / Web Developer, International
Outreach x3257 The opinion(s) contained within this email do not
necessarily represent those of St. Jude Children's Research Hospital.

--
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] Variable Variable Array

2005-03-10 Thread Ryan Jameson \(USA\)
Hi Folks,

I've been using "variable variables" for years with PHP.

$var = "myVarName";
$$var = "Some Val";

echo $myVarName; //outputs "Some Val"


... 
Today I am trying to assign an Associative Array value to a "variable
variable". For some reason it doesn't take. Does anyone know why?

Example:

$var['first']='bob';
$var['second']='frank';

$varName = "myVarName";
$$varName = $var;

echo $$varName['second']; //should output "frank" but doesn't. :-\
<-
echo $var['second']; //should output "frank" works fine.


The reason I want to do this is to speed up access to DATABASE query
results by use of the associative array. Since the results are keyed on
a specific column I'd like to load the very small recordset and then
access each row associatively on that column value. Currently I have to
requery the database every time, which is faster than loop/testing the
whole result set each time. I'd use a hashtable in Java but PHP ain't
Java. If ne1 has a better way I'm game.

Thanks for your help.
<>< Ryan

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



RE: [PHP-DB] Mysql_fetch_array

2004-09-30 Thread Ryan Jameson \(USA\)
It means that the  "supplied argument is not a valid MySQL result
resource" so.. Line 17 of your script mailsender2.php is trying to
manipulate a variable that isn't actually a mysql result. In some
previous line you should have set the result resource variable equal to
something else, on that line there is probably some problem with your
query or it is empty altogether.

We usually call "result resource" variables $rs, but it can be anything
you or your program wanted to call it...

<>< Ryan

-Original Message-
From: Yemi Obembe [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 2:30 PM
To: [EMAIL PROTECTED]
Subject: *** Detected as Spam ***[PHP-DB] Mysql_fetch_array



Does anyone have an idea what may probably be the cause of this error: 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in /var/www/ng/mailsender2.php on line 17



-

A passion till tomorrow,
www.opeyemi.tk





-
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.

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



RE: [PHP-DB] Ldap query problem

2004-07-15 Thread Ryan Jameson \(USA\)
I found it! The parenthesis need to be escaped, which I had tried, but
silly PHP went and escaped my escapes... :-\  So the criteria on the
query needed to be cn=Ryan Jameson \(MyDomain\) ... I was entering the
criteria via a form which PHP conveniently turned into cn=Ryan Jameson
\\(MyDomain\\) which didn't work. Thanks for the response!!!

<>< Ryan

-Original Message-
From: Swan, Nicole [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 15, 2004 4:01 PM
To: Ryan Jameson; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Ldap query problem

Do you have some code you can provide so we can get a better idea of
what you're trying to do?  

My guess is that the filter isn't set up quite right (as in the base dn
you're attaching to get the dn is not formatted correctly).  What
exactly are you trying to achieve?

--Nicole
---
Nicole Swan
Web Programming Specialist
Carroll College CCIT
(406)447-4310


-Original Message-
From: Ryan Jameson [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 3:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Ldap query problem


My LDAP queries seem to have a problem with parenthesis, does anyone
know how to fix this?

Example...

Criteria  cn=Ryan Jameson* works fine returning user with cn=Ryan
Jameson
(MyDomain)

But...

Criteria cn=Ryan Jameson (MyDomain) returns nothing. :-\

<>< Ryan

--
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] Passthru Strangeness

2004-05-20 Thread Ryan Jameson (USA)
Hi All,

My win32 server is not in safe_mode but I can only use passthru for
simple commands like "dir" and "type" but when I try to do say a "ping"
it simply returns no output but no error either.

Anyone have an idea what's going on? I have used it for ping in the
past. Ultimately I plan to use it to launch local DB functions, but I
can't even get it to ping.

Thanks.
<>< Ryan

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



RE: [PHP-DB] Re: mail() function and AOL users

2004-05-19 Thread Ryan Jameson (USA)
I'm quite sure it's not a problem with the mail function. It's probably
the reverse dns configuration on your SMTP/sendmail server. AOL &
Verizon have been two real sticklers for that.

If you know the IP address that your server is sending the email from
you can use this:

http://www.dnsstuff.com/tools/ptr.ch?ip=YOURIPADDRESS

To check the revers dns resolution. You may be surprised.

<>< Ryan 

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: mail() function and AOL users

Hello,

On 12/12/2003 04:34 AM, Matt Perry wrote:
> I use the following php mail function in an online applicaiton
program:
> 
> mail($email, "application submitted", $message, "From: 
> [EMAIL PROTECTED]");
> 
> This function does not always work when I modify $message.  I have 
> checked for null values for $message already but this does not seem to

> be the problem.
> I am trying to develop some sort of pattern of when this function 
> works and when it does not.
> The only essential difference between the values I pass in for message

> is the one that does not always work includes a link.  Apparently 
> anyone useing AOL email is particularly vulnerable to this problem.
> 
> Is it likely that AOL and other mail servers sometimes block any email

> from a web site if it has a link in the main body?  Or should I not be

> useing mail() in this manner to begin with?

Maybe you are not generating the message headers and body properly. 
Without seeing the code that you use to define $message, it is hard to
tell.

I just suggest that you try this class to properly compose and send your
messages:

http://www.phpclasses.org/mimemessage


-- 

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
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] Need some HELP

2004-05-10 Thread Ryan Jameson (USA)
It looks like "register_globals" is off. You'll have to access the
variables in the post array on your second page:

 print "";

and so on... Try that first.

<>< Ryan

-Original Message-
From: Adam Farid [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 10, 2004 12:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Need some HELP

Hi,

I am  a new to php. I am using php ver 4.0.3 and MySQL.

I have wrote two files and I'd like to pass some varaibles from first
file to use them in the second file.
but  the values did not displayed in the second file(nothing print out).
and also I want to pass them to anothr file ...  here is what I've wrote
:

 file1.php**
";
print "";
print "\n";
print "";
print "";
print "";
print "";

?>

** second file file2.php 


 

";
 print "";
 print ""; ?>

Name:
User Number: 
Address:  ...



..


Kind Regrads
Adam
I hope someone  can help me. Thanks

_
Stay in touch with absent friends - get MSN Messenger
http://www.msn.co.uk/messenger

--
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] Mail() - Preposterous Accusation

2004-04-08 Thread Ryan Jameson (USA)
He says later in his email that:

"The reason I mention this is because any email delivery failures will
not be sent back to you, but to our servers (due to the way that PHP
writes the email headers when using the mail() command)."

... Is there a way to get the bounces to go to the reply to address?
I've never really cared to, but now that he mentions it ... It would be
nice.

<>< Ryan

-Original Message-
From: -{ Rene Brehmer }- [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 08, 2004 6:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Mail() - Preposterous Accusation

At 00:01 08-04-2004, Ryan Jameson (USA) wrote:
>I know this isn't technically DB related but this is the list that I 
>use. I'd just like to know if anyone else thinks the below statement is

>accurate. If it is, why hasn't the mail function been modified in the 
>more recent builds? I've been using PHP since it was invented & never 
>had a problem with mail.
>
>"Also note that your form page is currently using the PHP mail() 
>function, which doesn't work very well anymore.  You would be best 
>advised to use another solution (one example is PHPMailer -
>http://phpmailer.sf.net/) for doing PHP script-based email delivery."


Sounds alot more like advertising than sanity ... there's not much
trickery in using the mail() function ... only if you want to attach
files can it get a bit tricky (encoding the file and inserting the
result), but in reality, there's not much in using that function
properly ...


Rene

--
Rene Brehmer
aka Metalbunny

~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/

--
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] Mail() - Preposterous Accusation

2004-04-07 Thread Ryan Jameson (USA)
I know this isn't technically DB related but this is the list that I
use. I'd just like to know if anyone else thinks the below statement is
accurate. If it is, why hasn't the mail function been modified in the
more recent builds? I've been using PHP since it was invented & never
had a problem with mail.

"Also note that your form page is currently using the PHP mail()
function, which doesn't work very well anymore.  You would be best
advised to use another solution (one example is PHPMailer -
http://phpmailer.sf.net/) for doing PHP script-based email delivery."


<>< Ryan

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



RE: [PHP-DB] MySql query

2004-03-17 Thread Ryan Jameson (USA)
One reason that my queries will look like what you described is that
later I append more conditions. The where 1 allows me to tack them all
on with AND or OR instead of having to put the where on later and decide
things like if I need to put AND or OR or WHERE or whatever... The WHERE
1 keeps it simple 

<>< Ryan 

-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 17, 2004 10:15 AM
To: Matt Matijevich
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySql query

Yes, where evaluates to true.


On Wed, 2004-03-17 at 12:03, Matt Matijevich wrote:
> This is probably a question for for a mysql list but I figured someone

> out here knows the answer.
> 
> I am working with an existing mysql application and there is a bunch 
> of queries that are formatted something like this:
> 
> SELECT * FROM sometable WHERE 1
> 
> does "WHERE 1" just return every row?
> 
> thanks in advance.
-- 

Adam Voigt
[EMAIL PROTECTED]

--
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] Query to Array to Echo Problem

2004-02-24 Thread Ryan Jameson (USA)
One thing may be that you need to do a fetch to increment the result row
odbc_fetch_row($result);.  Though that doesn't explain your column names
being in the array unless that's what's in the table.

<>< Ryan

-Original Message-
From: Karen Resplendo [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 24, 2004 5:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Query to Array to Echo Problem

Here is the webpage that demonstrates my code problem:
http://170.104.158.16/chemlatestPAGETEST.php3?pwsno=00100
 
I'm so close I can smell it. Hoping someone can troubleshoot my code.
Here is the piece that doesn't work. It returns the 2 column names, over
and over. For some reason I'm not loading the values from the query.
(Using only 2 columns for now and hardcoding number of rows):
 
function QueryIntoArray($query){
 settype($retval,"array");
 /* connect to sdwis server*/
$connectionSDWIS = odbc_connect("","","");
if(!$connectionSDWIS) die("Couldn't connect");
/* select sdwis database */
odbc_do($connectionSDWIS, "use ");
 
$result= odbc_do($connectionSDWIS,$query);  if(!$result){
   print "Query Failed";  }  for($i=0;$i<100;$i++){
$fields=odbc_num_fields($result);
  for($j=1;$j <$fields;$j++){
$retval[$i][odbc_field_name($result,$j)] =
odbc_result($result,$j);
   }//end inner loop
  }//end outer loop
return $retval;
}//end function
 
 
$query = "SELECT DISTINCT PWS, PWSName, CONVERT(varchar(12),
DateCollected, 101), AnalyteName, SourceID, str(Results,7,4), str(MCL,
7,4), UOM, DateCollected FROM ChemMon WHERE PWSID='00100'  AND
AnalyteCode NOT IN('3013','3014','3100') ORDER BY DateCollected DESC,
AnalyteName ";

settype($myresult,"array");
$myresult = QueryIntoArray($query);
for($i=0;$ihttp://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] PHP Command Line

2004-01-29 Thread Ryan Jameson (USA)
Bummer... So I can't send the named variables as a query string? Well,
this will work. Thanks! 

-Original Message-
From: Paul Miller [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 3:51 PM
To: 'PHP-DB'
Subject: RE: [PHP-DB] PHP Command Line

php script.php %1 %2 %3 %4

And it is referenced as $argv[arg number]

... I think. To be sure, here is the link to that info:

http://www.php.net/manual/en/features.commandline.php

- Paul

-Original Message-----
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 29, 2004 4:34 PM
To: PHP-DB
Subject: [PHP-DB] PHP Command Line


Anyone know how to pass a query string to a php script when you call it
on the command line?

<>< Ryan

-- 
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] PHP Command Line

2004-01-29 Thread Ryan Jameson (USA)
Anyone know how to pass a query string to a php script when you call it
on the command line?

<>< Ryan

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



[PHP-DB] MS SQL Server Question

2004-01-27 Thread Ryan Jameson (USA)
This doesn't have anything to do with PHP, but it does have to do with
MS SQL server and I know we've got a buncha smart folks on this list.
I'm sure you'll forgive the slightly OT post.

I have a stored procedure that I want to protect from external rollback
calls. Basically, it logs calls to itself, but if there is a rollback in
the procedure that called it then it gets rolled back as well and the
log entry gets removed. Does anyone know if it's possible to cause the
procedure to act atomically?

<>< Ryan

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



RE: [PHP-DB] Images stored in a db - how to get them?

2004-01-26 Thread Ryan Jameson (USA)
 about once a quarter this question comes up and the answer is always
the same. Don't store them in the database, just store filenames and
store the files in the filesystem. That way you just generate a link and
treat it like any other image. Then when you query the database you
would create img tags with src property set to the image. You probably
don't want to store FULL path info, just enough to find the image.

<>< Ryan

-Original Message-
From: John T. Beresford [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 26, 2004 2:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Images stored in a db - how to get them?

Hello All,

I am interested in storing images in a table. My question is - What is
the proper way of retrieving the images and displaying them on a web
page?

Will I need to go through the GD library and create an image from the
information stored in the table?

While PHP is not new to me, images in db's is. Specifically, when info
is returned, it's usually in the form of:

$var=$row['FieldName'];

What would I then do with the 'BLOB' information? Is that where the GD
image tools come in play?


Any URL's or small hints to point in the right direction would be 
very much appreciated.

Thanks,
John
-- 
===
John T. Beresford
Apple Certified Technical Coordinator
http://www.deewi.com/
405.760.0794

-- 
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] Results with ledger stripes?

2004-01-26 Thread Ryan Jameson (USA)
$bg1 = "#dd";
$bg2 = "#ff";
While ...
$bg3 = $bg2;
$bg2 = $bg1;
$bg1 = $bg3;
echo " 

Makes sense?

<>< Ryan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 25, 2004 6:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Results with ledger stripes?

Hello all,

I'm in the midst of creating an internet speed test system thingamabob
for my website.  It's basically finished...but ugly as sin.  What I'd
like to do is have the results (an average of each domain tested) listed
in a nice pretty table with alternating background colors, kinda like a
ledger.  How on earth do I do this?

Here's what I've got thus far:

"; $mongo = @mysql_query
("SELECT
substring_index(name,'.',-2),ROUND(AVG(speed),1) FROM `readings` GROUP
BY
substring_index(name,'.',-2) ORDER BY substring_index(name,'.',-2)
ASC"); echo "DomainAverage Speed\n";
while ($mongorow = mysql_fetch_array($mongo, MYSQL_NUM)) { echo
"$mongorow[0]$mongorow[1]\n";}
echo "";
?>

And I'd like it to spit out something along these lines:

domain1.com666.6 kbps domain2.com3000.0 kbps repeat
until done 

The gizmo is up and running at
http://www.dibcomputers.com/bandwidthmeter/index.php if you care to have
a gander.
Thanks a bunch,
Dan

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



RE: [PHP-DB] PHP Processing

2004-01-05 Thread Ryan Jameson (USA)
It appears that execution does stop if there is any output to the
browser. I usually do all of my "query work" before sending output to
the browser which would explain why I haven't seen it fail to complete. 

I think this is what happens:

mysql_db_query(blaaa); < These three should happen regardless.
mysql_db_query(blaaa);
mysql_db_query(blaaa);
echo "blaaa";  <-- This point could stop if 
user has hit stop when it gets there.
mysql_db)query(blaaa);

Anyone know different? Anyway, ignore_user_abort(true); seems to do the
trick.

<>< Ryan 

-Original Message-
From: Alan Langford [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 05, 2004 3:48 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] PHP Processing

Do a search for "user stop" in the PHP manual, there you will find
"connection handling" and the ignore_user_abort function.

At 2004/01/05 17:14, Peter Westergaard wrote:
>I'm sorry, I feel dense coming to the list for this, because I'm SURE 
>I've read about this in the PHP or Mysql docs, but I can't seem to 
>locate where.
>
>Let's say users submit a form which is processed by a PHP page which 
>performs a number of MySQL INSERT, UPDATE, and/or DELETE commands.
>.
>
>What happens if the user hits "Stop" or "Refresh" in their browser 
>before the transaction is complete - is there a possibility that
>only some of the MySQL commands will complete?   Not a problem if
>the services are all running well, but I'm thinking if things are 
>getting thrashed on the server for whatever reason, it might take 
>several seconds to complete the various SQL commands, also increasing 
>the likelihood of the user getting bored enough to start playing "bull 
>in a browser shop".
>
>And since MySQL has no rollback feature that I'm aware of, how would 
>you best handle this dangerous potentiality?  Suggestions?  A humble
>request:  Responses which begin with: "Don't use MySQL", please include

>a good affordable alternative?
>
>-P
>
>Peter Westergaard
>[EMAIL PROTECTED] ###   ICQ#: 10294457
>http://www.westergaard.ca/   ###   http://courtly.livejournal.com
>--
>'Alright, you guys start coding.  I'll go find out what the customer 
>wants.'
>
>
>
>
>===
>EASY and FREE access to your email anywhere: http://Mailreader.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



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



RE: [PHP-DB] PHP Processing

2004-01-05 Thread Ryan Jameson (USA)
I believe the PHP parser will completely process that page whether you
click stop or not. In my experience it's always been "all" or "nothing"
as long as you don't hit an error half way through which I'd imagine
could cause a problem. 
<>< Ryan

-Original Message-
From: Peter Westergaard [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 05, 2004 3:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] PHP Processing

I'm sorry, I feel dense coming to the list for this, because I'm SURE
I've read about this in the PHP or Mysql docs, but I can't seem to
locate where.

Let's say users submit a form which is processed by a PHP page which
performs a number of MySQL INSERT, UPDATE, and/or DELETE commands.
.

What happens if the user hits "Stop" or "Refresh" in their browser
before the transaction is complete - is there a possibility that 
only some of the MySQL commands will complete?   Not a problem if 
the services are all running well, but I'm thinking if things are
getting thrashed on the server for whatever reason, it might take
several seconds to complete the various SQL commands, also increasing
the likelihood of the user getting bored enough to start playing "bull
in a browser shop".

And since MySQL has no rollback feature that I'm aware of, how would you
best handle this dangerous potentiality?  Suggestions?  A humble
request:  Responses which begin with: "Don't use MySQL", please include
a good affordable alternative?

-P

Peter Westergaard
[EMAIL PROTECTED] ###   ICQ#: 10294457
http://www.westergaard.ca/   ###   http://courtly.livejournal.com 
--
'Alright, you guys start coding.  I'll go find out what the customer 
wants.'




===
EASY and FREE access to your email anywhere: http://Mailreader.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] mysql + php

2003-12-08 Thread Ryan Jameson (USA)
James,
(B
(BThe consensus of developers here seems to have been not to store binary objects in the 
(Bdatabase. Rather store them in the file system and simply store reference records in 
(Bthe database.  It is much easier this way. If doing it differently is not an option 
(Bfor you hopefully someone else on the list has done this. Unfortunately, I'm pretty 
(Bsure most of us haven't even tried since it is so much simpler to store them in the 
(Bfile system.
(B
(BHope this is helpful.
(B
(B<>< Ryan
(B
(B-Original Message-
(BFrom: Will Contact [mailto:[EMAIL PROTECTED] 
(BSent: Monday, December 08, 2003 1:10 PM
(BTo: [EMAIL PROTECTED]
(BSubject: [PHP-DB] mysql + php 
(B
(Bhi!
(B
(BI  am first question of php in this news group. I would like to ask my question about 
(Bphp + mysql. Now I am  programming php+mysql.  I put word, excel, mpeg and any 
(Bbinaries into the mySQL database using php on linux server,But I can take out these 
(Bbinay from mySQL database. I would like to see the files and save my pc from server. 
(BSo how can I take out from these binaries? If you know it how to take out and show it, 
(Bplease teach and help me how!!.
(BThe information table of mySQL is "objects." So here is the program below;
(B
(B// database information
(Bcreate table objects
(B  b_col blob,
(B  name varchar(30),
(B  file_size varchar(30),
(B  file_date datetime
(B}
(B// it works from "insert" SQL  abc.php
(B$db = mysql_connect("*", "***", "");
(Bmysql_select_db("***",$db);
(B$sql_insert = "INSERT INTO objects(b_col, file_name, file_size,
(Bfile_type,file_date) VALUES
(B('$UploadedFile','$UploadedFile_name','$UploadedFile_size','$UploadedFile_type',now())";
(B
(B   mysql_query($sql_insert);
(B
(B//
(B// But it does not work at. I can not see anything in my browser
(B$sql_select = "select b_col, file_name, file_size, file_type, file_date from 
(Bobjects where  file_name like 'gball.gif'";
(Bif(!($result=mysql_query($sql_select,$db))){
(Bdie;
(B}
(B
(B   $file_name = mysql_result ($result,0,"file_name");
(B   echo $file_name; 
(B
(B
(B
(BRegards,
(Bjames
(B
(B_
$BM'C#$H(J24$B;~4V%[%C%H%i%$%s!V(JMSN $B%a%C%;%s%8%c!http://messenger.msn.co.jp 
(B
(B--
(BPHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: 
(Bhttp://www.php.net/unsub.php
(B
(B-- 
(BPHP Database Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Oracle to Sybase PHP question

2003-11-25 Thread Ryan Jameson (USA)
I haven't done it in a while but Oracle can write to Sybase directly
using a linked server connection. PHP should not be necessary in this
case. Though PHP is the best scripting language out. :-)

<>< Ryan 

-Original Message-
From: Jon Davis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 25, 2003 9:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Oracle to Sybase PHP question

Hello PHP gurus,

I have just started to learn PHP, since I have inherited some previous
PHP scripts that I must maintain.

My question is this:  I have to write a script that gets data from a
view in Oracle.  I then need to insert that data into a Sybase database.
Can this be done?  This will run every 5 minutes.  The view could
produce 0 rows of data or multiple rows of data, so I guess I would need
to use an array of some kind.

Anyone have any ideas that could point me in the right direction?

Thanks
Jion

_
>From the hottest toys to tips on keeping fit this winter, you'll find a
range of helpful holiday info here.  
http://special.msn.com/network/happyholidays.armx

--
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] send email

2003-11-25 Thread Ryan Jameson (USA)
You may want to loop through the form results and create the message
body dynamically based on the info from the form as well. PHP's mail
function is the easiest of any scripting language I've used.
www.php.net/mail

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 25, 2003 6:46 AM
To: redhat
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] send email


www.php.net/mail




 

  redhat

  <[EMAIL PROTECTED]To:
[EMAIL PROTECTED]

  ic.com>  cc:

   Subject:  [PHP-DB] send
email
  11/25/2003 08:43

  AM

 

 





I have created a simple form that dumps input information into a mysql
database.  The person that I created it for said it would be nice if it
would also notify him by email that an entry was added to the database.
I have no idea where to begin with that - any ideas?
thanks,
DF

--
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] Splitting a CSV file

2003-11-25 Thread Ryan Jameson (USA)
I've never seen where the file size causes a problem that wasn't one of
the file size settings either in the upload form or php.ini. I'd focus
on figuring out why it's failing on the large files before trying to
split it. No errors at all? Just a blank screen? Are you uploading the
file through a browser? 

<>< Ryan 

-Original Message-
From: Matt Babineau [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2003 2:37 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Splitting a CSV file

Chris,

If you are on a Redhat machine, you could try running a CLI command on
this.

Try looking up the 'split' command, it may solve your problem if you
combine it with some PHP.

-Matt

On Mon, 2003-11-24 at 19:14, Chris Payne wrote:
> Hi there everyone,
> 
> I'm writing an automation system to automatically insert data into a
mysql database from a CSV file, and it works great - until I try to
insert a large file, then it just doesn't do anything.
> 
> I've set my PHP filesize to 10 Megs so that's not the issue, and a
server timeout isn't the issue either.  So, is that a way that I can
split a CSV file into 2 files if it's larger than a certain size so that
I can still use the automation I am working on?
> 
> Actually, I won't see the files as it's for a company who just wants 
> to be able to select their CSV file (No matter what size) and it will 
> insert it automatically, and as I said it does work on small files but

> not large :-(
> 
> Any help would really be appreciated.
> 
> Chris

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

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



RE: [PHP-DB] No tuples available

2003-11-17 Thread Ryan Jameson (USA)
Great recommendation. The @ should work great. Thanks.

<>< Ryan 

-Original Message-
From: David T-G [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 13, 2003 8:03 PM
To: PHP DB list
Cc: Ryan Jameson (USA)
Subject: Re: [PHP-DB] No tuples available

Ryan --

...and then Ryan Jameson (USA) said...
%
% Is there a way to tell PHP to not show just this warning? Maybe there

Have you tried using @ in front of the odbc_fetch_row call?  That will
shut it up:

  PHP supports one error control operator: the at sign (@). When
  prepended to an expression in PHP, any error messages that might be
  generated by that expression will be ignored.

I'd bet a twinkie that you get it when you have no more data.  You
should implement the PEAR FutureGaze module so that you know to stop one
row earlier ;-)


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral
courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and
Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl
Npg!

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



RE: [PHP-DB] No tuples available

2003-11-13 Thread Ryan Jameson (USA)
I'm not using OpenLink. Thanks though.

-Original Message-
From: Ryan Marks [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 13, 2003 5:01 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] No tuples available

I Googled for your warning message and found this:
http://www.phpbuilder.com/mail/php-windows/2000111/0024.php

-Original Message-
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2003 5:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] No tuples available


Is there a way to tell PHP to not show just this warning? Maybe there
should be another warning level just for this warning, call it "trivial
and pointless". :-)

Warning: odbc_fetch_row(): No tuples available at this result index in 

I don't even know what it means. I get it all the time when I'm checking
if my query returned results. It's kinda silly.

Everything works fine & I'd like to leave error_reporting full so SQL
errors that report as warnings will be displayed.

Thanks!
<>< Ryan

--
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] No tuples available

2003-11-13 Thread Ryan Jameson (USA)
Is there a way to tell PHP to not show just this warning? Maybe there
should be another warning level just for this warning, call it "trivial
and pointless". :-)

Warning: odbc_fetch_row(): No tuples available at this result index in 

I don't even know what it means. I get it all the time when I'm checking
if my query returned results. It's kinda silly.

Everything works fine & I'd like to leave error_reporting full so SQL
errors that report as warnings will be displayed.

Thanks!
<>< Ryan

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



RE: [PHP-DB] Urgent help needed

2003-10-21 Thread Ryan Jameson (USA)
Or you could hire John or me to do it for you. :-) Just kidding. I used the delimiting 
solution all over the place it is pretty simple.

<>< Ryan

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 4:42 PM
To: Chris Payne
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Urgent help needed


Chris Payne wrote:

> Basically, aswell as sending the ID, 
 > I need to send the title and path too
 > and i'm abit confused.
> 
> 

You could pass the value as "id/title/path" where / is a delimiter, then 
pull it apart on the other side.

Or, you could format 3 different elements like this:





Now, when a checkbox is checked, you'll end up with something like 
$del[1234]. Just pull the key or value and then you'll be able to 
determine $title[1234] and $path[1234] to use in your script.

foreach($del as $id)
{ echo "Deleting id: $id, title: {$title[$id]}, path: {$path[$id]}"; }

-- 
---John Holmes...

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

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

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

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



RE: [PHP-DB] Very confused with query

2003-07-07 Thread Ryan Jameson (USA)
distinct always applies to the entire record set, so if you return 2 fields the two 
fields together will be distinct. In this case it looks like you want to get rid of 
distinct and put:

group by transaction_user_id

at the end. Since you already have MAX(transaction_date), it will work as long as you 
remove the ,* . The problem with * is that sql won't know what to return for the other 
fields, since it only has one row to put it in, it needs to know what value ie.. 
max(), avg(), last() ... so on... you'll need to use an aggregate function for any 
fields you want to include.

Does that help?

<>< Ryan

-Original Message-
From: Matthew Moldvan [mailto:[EMAIL PROTECTED]
Sent: Monday, July 07, 2003 1:18 PM
To: 'Sparky Kopetzky'; PHP DB Group
Subject: RE: [PHP-DB] Very confused with query


Hi Robin,

I think you are not using DISTINCT correctly ... try SELECT DISTINCT
whatever instead of the ()s.  Also, the use of * and DISTINCT together
really makes no sense ... in the SQL, you are saying select only one record,
then select everything, which are opposites.

Don't mean to be rude, but I recommend picking up a good book on database
theory. :)

Regards,
Matthew Moldvan
 
System Administrator
Trilogy International, Inc.

-Original Message-
From: Sparky Kopetzky [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 05, 2003 12:20 PM
To: PHP DB Group
Subject: [PHP-DB] Very confused with query


Good morning!!

I'm trying to select 1 and only one record from each user based on the last
date from a transaction file. This is what I'm using and it's not even
close. It seems DISTINCT does not work!!

SELECT DISCTINCT(transaction_user_id), MAX(transaction_date), * FROM
transaction;

Could some kind soul help me figure this one out??

Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net


-- 
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] latest version of php only cgi?

2003-06-26 Thread Ryan Jameson (USA)
It seems to be capable of being installed as ISAPI but I haven't had any luck yet. I 
have heard of people who have though. So... ???

<>< Ryan

-Original Message-
From: Doug Finch [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 2:12 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] latest version of php only cgi?


Is the newest version of php 4 only available as a cgi-based program?
DF




-- 
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] Can't go higher than PHP 4.3.0

2003-06-26 Thread Ryan Jameson (USA)
I'm trying to update to the latest version but I can't get anything newer than 4.3.0 
to run in ISAPI mode. Any ideas?

Thanks..

<>< Ryan

Ryan Jameson
Software Development Services Manager 
International Bible Society
W (719) 867-2692

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



[PHP-DB] RE: Problem with 4.3.2

2003-06-16 Thread Ryan Jameson (USA)

Funny you should ask. I actually didn't try it on anything else. So I went back and 
tried a simple script and got the same message. Thanks for the idea. I haven't gotten 
any other feedback on this.

<>< Ryan

-Original Message-
From: Jacob Marble [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 12:14 PM
To: Ryan Jameson (USA)
Subject: Re: Problem with 4.3.2


Interesting.  They say the ISAPI module isn't production quality yet... we
use it, though, w/o problems.  We're running IIS on Win2000 and php 4.3.2.
Does it work besides the phpinfo() problem?

Jake

LandEZ

"Ryan Jameson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
More info... I only get that message in ISAPI mode. :-\

<>< Ryan

-Original Message-
From: Ryan Jameson (USA)
Sent: Thursday, June 12, 2003 11:10 AM
To: [EMAIL PROTECTED]
Subject: Problem with 4.3.2


When I change over to 4.3.2 I get this message from phpinfo();

The operating system cannot run %1.

... any ideas? Thanks...

<>< Ryan

Ryan Jameson
Software Development Services Manager
International Bible Society




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



[PHP-DB] RE: Problem with 4.3.2

2003-06-12 Thread Ryan Jameson (USA)
More info... I only get that message in ISAPI mode. :-\

<>< Ryan

-Original Message-----
From: Ryan Jameson (USA) 
Sent: Thursday, June 12, 2003 11:10 AM
To: [EMAIL PROTECTED]
Subject: Problem with 4.3.2


When I change over to 4.3.2 I get this message from phpinfo();

The operating system cannot run %1. 

... any ideas? Thanks...

<>< Ryan

Ryan Jameson
Software Development Services Manager 
International Bible Society

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



[PHP-DB] Problem with 4.3.2

2003-06-12 Thread Ryan Jameson (USA)
When I change over to 4.3.2 I get this message from phpinfo();

The operating system cannot run %1. 

... any ideas? Thanks...

<>< Ryan

Ryan Jameson
Software Development Services Manager 
International Bible Society

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



RE: [PHP-DB] ODBC Timout for MS SQL Driver

2003-03-03 Thread Ryan Jameson (USA)
Ok I tried this another way but using the ms sql functions along with:

ini_set("mssql.timeout",2);
ini_set("mssql.connect_timeout",2);

... no change, it still takes about 7-8 seconds to decide it couldn't connect.

<>< Ryan

-----Original Message-
From: Ryan Jameson (USA) 
Sent: Monday, March 03, 2003 11:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] ODBC Timout for MS SQL Driver


Does anyone know a reliable way to set an ODBC connection to timeout after a very 
short time? I've tried set_time_limit but when the query is running PHP does not drop 
out, I've also tried odbc_setoption on the connection before executing. Basically, I 
want it to just fail quicker if it is going to. 30 seconds is too long.

<>< Ryan

Ryan Jameson
Software Development Services Manager 
International Bible Society
W (719) 867-2692

-- 
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] ODBC Timout for MS SQL Driver

2003-03-03 Thread Ryan Jameson (USA)
Does anyone know a reliable way to set an ODBC connection to timeout after a very 
short time? I've tried set_time_limit but when the query is running PHP does not drop 
out, I've also tried odbc_setoption on the connection before executing. Basically, I 
want it to just fail quicker if it is going to. 30 seconds is too long.

<>< Ryan

Ryan Jameson
Software Development Services Manager 
International Bible Society
W (719) 867-2692

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



RE: [PHP-DB] What wrong in this SQL

2003-02-27 Thread Ryan Jameson (USA)
I don't believe you can delete from two tables simultaneously in this fashion, it's 
probably the ,articles that's the error.

<>< Ryan

-Original Message-
From: Alawi shekh albaity [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 11:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] What wrong in this SQL


 What wrong with this code in sql : 
$SQLSTATEMENT["DeleteCategory"] = "
  DELETE FROM cats, articles
  WHERE cat_id = $catid
 ";

Error no:
 1064
Details :
You have an error in your SQL syntax near 'WHERE cat_id = 1 ' at line 4

-- 
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] RE: PHP4 on Windows & using MSSQL

2003-02-26 Thread Ryan Jameson (USA)
I use this combination very successfully. I stick with ODBC for the SQL access though.

<>< Ryan

-Original Message-
From: Oliver Cronk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 3:23 AM
To: Kevin Gordon
Cc: PHP Mail
Subject: [PHP-DB] RE: PHP4 on Windows & using MSSQL


Sorry made a typo in my last email - I mean't to say wouldn't recommend it
rather than would (in reference to using MSSQL from Linux).

Hope you get the issue sorted

Cheers

Ollie

-Original Message-
From: Kevin Gordon [mailto:[EMAIL PROTECTED]
Sent: 26 February 2003 08:23
To: Oliver Cronk
Cc: PHP Mail
Subject: RE: PHP4 on Windows & using MSSQL


Thanks Ollie. I will check Tcp or Named Pipes.

I have found a Linux Journal article dated 14 Feb 2003 using a FreeTDS
driver and ODBC to MSSQL and will try that.
Cheers,
Kevin

On Tue, 2003-02-25 at 23:25, Oliver Cronk wrote:
> Yes, but I have never personally used Linux to connect to MSSQL so I can't
> really help you on that one.  Although I hear that several people have
done
> this I would really recommend it (as Linux isn't a supported client O/S
for
> MSSQL).  It is *fairly* straightforward on Windows - the hardest bit is
> making sure you have all the correct DLL's in the right places etc etc.
>
> I use MySQL/ Postgres these days so I can't really remember all the stuff
I
> had to do to get MSSQL working with PHP but I will have a think and let
you
> know if I think of anything that might be useful.
>
> After having another quick look at your error message at the bottom of
your
> original email it might be worth looking at your MSSQL Server connection
> config dialogs - make sure that TCP/IP has been enabled (looks like you
> might just have named pipes).
>
> Regards
>
> Ollie Cronk
>
> -Original Message-
> From: Kevin Gordon [mailto:[EMAIL PROTECTED]
> Sent: 25 February 2003 08:05
> To: Oliver Cronk
> Cc: PHP Mail
> Subject: RE: PHP4 on Windows & using MSSQL
>
>
> Thanks Ollie
> I guess this means using PHP4 MSSQL functions in Windows and PHP4 Sybase
> functions in Linux?
>
>
> On Tue, 2003-02-25 at 04:47, Oliver Cronk wrote:
> > The MSSQL module for PHP DOES NOT USE ODBC.  It uses the C library
direct
> > style of connecting to MSSQL.  Use your enterprise manager to configure
> the
> > appropriate users and permissions and you should be fine.
> >
> > Ollie Cronk
> > www.cronky.net
> >
> > -Original Message-
> > From: Kevin Gordon [mailto:[EMAIL PROTECTED]
> > Sent: 24 February 2003 07:09
> > To: PHP Mail
> > Subject: PHP4 on Windows & using MSSQL
> >
> >
> > Hi Everyone,
> >
> > >From a Linux session:
> > ~ # telnet 10.1.1.1 1433
> > Trying 10.1.1.1...
> > Connected to 10.1.1.1.
> > Escape character is '^]'.
> > Connection closed by foreign host.
> >
> > >From within NT4 Primary Domain Server:
> > SQL Server Query Analyzer using the user login & password applied in PHP
> > (and created in MSSQL) Queries processed ok.
> >
> > In PHP must I use NT authenticated login / password?
> >
> > Both a PHP client on Linux and Windows receive the same error message:
> > Warning: SQL error: [Microsoft][ODBC SQL Server Driver][Named
> > Pipes]Specified SQL server not found., SQL state 08001 in SQLConnect in
> > E:\Inetpub\wwwroot\php\ODBC_Driver.php on line 174
> >
> > The PHP.ini file on NT4 has:
> > **
> > [MSSQL]
> > ; Allow or prevent persistent links.
> > mssql.allow_persistent = On
> >
> > ; Maximum number of persistent links.  -1 means no limit.
> > mssql.max_persistent = -1
> >
> > ; Maximum number of links (persistent+non persistent).  -1 means no
> > limit.
> > mssql.max_links = -1
> >
> > ; Minimum error severity to display.
> > mssql.min_error_severity = 10
> >
> > ; Minimum message severity to display.
> > mssql.min_message_severity = 10
> >
> > ; Compatability mode with old versions of PHP 3.0.
> > mssql.compatability_mode = Off
> >
> > ; Valid range 0 - 2147483647.  Default = 4096.
> > ;mssql.textlimit = 4096
> >
> > ; Valid range 0 - 2147483647.  Default = 4096.
> > ;mssql.textsize = 4096
> >
> > ; Limits the number of records in each batch.  0 = all records in one
> > batch.
> > ;mssql.batchsize = 0
> >
> > ; Use NT authentication when connecting to the server
> > mssql.secure_connection = Off
> >
> > ; Specify max number of processes. Default = 25
> > ;mssql.max_procs = 25
> >
> > 
> > ntwdblib.dll is in the correct Windows directory.
> >
> > Using a System DNS for ODBC. Should I be using a File DNS?
> >
> > Can I open up NT4 PDS to telenet to it?
> >
> > Any thoughts, comments?
> > Many thanks,
> >
> > Kevin Gordon
> > New Zealand
> >
> >
> >
>
>
>
>




-- 
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] file and https

2003-02-21 Thread Ryan Jameson (USA)
Thanks all..

John - What do you mean have SSL installed? Does PHP have a SSL module? I'm already 
running 4.3.1 so I'm fine there. 

Also, this is quite database related as the intention is to access data on a remote 
server through a secure connection. XML is arguably a database protocol. :-)

<>< Ryan

-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 8:05 AM
To: Ryan Jameson (USA); [EMAIL PROTECTED]
Subject: Re: [PHP-DB] file and https


> Has anyone found a way to import data through
> ssl into a php script? If I can pull xml formatted
> data through a secure socket it will save some
> major headaches with a problem I need to solve.
>
> $url = file("https://www.mydomain.com";); Would
> be ideal, but it does not work

It does work in PHP 4.3 if you have SSL installed also (at least with
fopen). Other options would be to use cURL or make an exec call to Lynx (or
any browser) to retrieve the data.

---John Holmes...


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


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




[PHP-DB] file and https

2003-02-21 Thread Ryan Jameson (USA)
Has anyone found a way to import data through ssl into a php script? If I can pull xml 
formatted data through a secure socket it will save some major headaches with a 
problem I need to solve.

$url = file("https://www.mydomain.com";); Would be ideal, but it does not work

<>< Ryan

Ryan Jameson
Software Development Services Manager 
International Bible Society
W (719) 867-2692

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




RE: [PHP-DB] Sybase timouts

2003-02-20 Thread Ryan Jameson (USA)
Figured it out. it requires a default logon id on the connection tab on the odbc 
connection. Who knows why...

<>< Ryan

-Original Message-----
From: Ryan Jameson (USA) 
Sent: Thursday, February 20, 2003 12:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Sybase timouts


SQL error: [INTERSOLV][ODBC SQL Server driver][SQL Server]ct_connect(): user api 
layer: internal Client Library error: Read from the server has timed out., SQL state 
S1T00 in SQLConnect in 

Anyone had this problem? I cannot find anywhere that will allow me to change the 
timeout.

<>< Ryan



Ryan Jameson
Software Development Services Manager 
International Bible Society
W (719) 867-2692

-- 
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] Sybase timouts

2003-02-20 Thread Ryan Jameson (USA)
SQL error: [INTERSOLV][ODBC SQL Server driver][SQL Server]ct_connect(): user api 
layer: internal Client Library error: Read from the server has timed out., SQL state 
S1T00 in SQLConnect in 

Anyone had this problem? I cannot find anywhere that will allow me to change the 
timeout.

<>< Ryan



Ryan Jameson
Software Development Services Manager 
International Bible Society
W (719) 867-2692

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




RE: [PHP-DB] ping

2003-02-17 Thread Ryan Jameson (USA)
see: http://www.php.net/manual/en/ref.exec.php

-Original Message-
From: bo [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 17, 2003 12:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] ping


Hi,
This is not exactly fall in the category of php and mysql, but hopefully
that you can shed a light for me.
My question is how can we write a php ping script to ping some website and
output the ip address of the website automatically on webpage?

It's the same idea that ping www.google.com in cmd prompt(@win2k)but output
the result in a webpage.
Any feedbacks and info will be appreciated.
Thanks.

Bo



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


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




RE: [PHP-DB] mysql +php

2003-02-17 Thread Ryan Jameson (USA)
BTW... you'll need something in the anchor:

while ($row= mysql_fetch_array($result)) //retrieve a row and store in 
echo "Something"; 


-Original Message-----
From: Ryan Jameson (USA) 
Sent: Monday, February 17, 2003 12:16 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql +php 


while ($row= mysql_fetch_array($result)) //retrieve a row and store in 
echo ""; 

That's how I'd do it.
<>< Ryan

-Original Message-
From: G [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 17, 2003 8:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql +php 


Hi I was wonder if any knows how 2 display sound clips held in a mysql 
database using a php page ? I have stored the url’s of the clips in 
mysql database and I belive I need some like to (below) to display them 
but its not quite working.


while ($row= mysql_fetch_row($result)) //retrieve a row and store in 
array $row
{
for($i=0; $i"); //

any ideas


-- 
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] mysql +php

2003-02-17 Thread Ryan Jameson (USA)
while ($row= mysql_fetch_array($result)) //retrieve a row and store in 
echo ""; 

That's how I'd do it.
<>< Ryan

-Original Message-
From: G [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 17, 2003 8:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql +php 


Hi I was wonder if any knows how 2 display sound clips held in a mysql 
database using a php page ? I have stored the url’s of the clips in 
mysql database and I belive I need some like to (below) to display them 
but its not quite working.


while ($row= mysql_fetch_row($result)) //retrieve a row and store in 
array $row
{
for($i=0; $i"); //

any ideas


-- 
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] Simple PHP Script

2003-02-13 Thread Ryan Jameson (USA)
It's the good ole' register_globals feature...

You'll need to either turn register_globals on in your php.ini file or access the 
variables from their respective arrays ($_SERVER,$_GET,$_POST)... since your form 
method is post it will be: $_POST['vname'].

Make sense?

If you put this at the top of your page it will extract these all for you:

if (!empty($_SERVER))
  extract($_SERVER);
  
if (!empty($_GET)) {
extract($_GET);
} else if (!empty($HTTP_GET_VARS)) {
extract($HTTP_GET_VARS);
}

if (!empty($_POST)) {
extract($_POST);
} else if (!empty($HTTP_POST_VARS)) {
extract($HTTP_POST_VARS);
}

 
<>< Ryan



-Original Message-
From: Poon, Kelvin (Infomart) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 2:12 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] Simple PHP Script


Hi,

I am new to PHP and had just written a simple php script to get things
started.  I have the following code:







Input yourname







So this page is suppose to display a input box and a submit button and once
you enter ur name and press the button, it should show Hello [ur name] and
the input box at the bottom of it and the button below and the process
continue.

I tried running it and inputted some text and pressed the button, and the
Hello [ur name] didn't show up, it just display an input box and the submit
button.

Can someone please help me?

Thanks a lot

Kelvin

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

2003-01-27 Thread Ryan Jameson (USA)
You should probably replace $name == "" with strlen($name) < 1.
Also, you should probably used $error .= instead of $error = so that you can list all 
the errors instead of just the last one.

<>< Ryan


-Original Message-
From: Addison Ellis [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 27, 2003 5:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] elseif


hello and thank you for your time.
will the below work to check if one field or the other is 
filled in upon submission? either contact_phone or contact_email is 
required but not both. best, addison

$error = "";
if ($name == "")
{
$error = "$errorYou must enter a company name.";
}
if ($address == "")
 {
 $error = "$errorYou must enter an address.";
 }
if ($city == "")
 {
 $error = "$errorYou must enter a city.";
 }
if ($state == "")
 {
 $error = "$errorYou must enter a state.";
 }
if ($zip == "")
 {
 $error = "$errorYou must enter a zip.";
 }
if ($contact_phone == "")
 {
 $error = "$errorYou must enter a contact phone number or 
email address.";
 }
elseif ($contact_email == "")
 {
 $error = "$errorYou must enter a contact phone number or 
email address.";
 }
if ($error == "")
{
$query = "insert into stores  set
-- 
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
[EMAIL PROTECTED]
[EMAIL PROTECTED]
subsidiaries of small independent publishing co.
[EMAIL PROTECTED]
[EMAIL PROTECTED]

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




RE: [PHP-DB] ldap_search in 4.3

2003-01-14 Thread Ryan Jameson (USA)
Well, I discovered that the php_ldap extension released with 4.2.3 works fine with php 
4.3 ... so I'm mostly upgraded. :-) however, I'd still like to have the new extension 
work. Let me know if anyone finds anything.

<>< Ryan

-Original Message-
From: Ryan Jameson (USA) 
Sent: Tuesday, January 14, 2003 4:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] ldap_search in 4.3


Weirdness

I just started using PHP 4.3 and something strange is happening with my ldap_search 
calls. It isn't working like it used to. Anyone have any ideas? When I revert to 4.2.3 
it works fine.

<>< Ryan


Ryan Jameson
Software Development Services Manager 
International Bible Society
W (719) 867-2692

-- 
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] ldap_search in 4.3

2003-01-14 Thread Ryan Jameson (USA)
Weirdness

I just started using PHP 4.3 and something strange is happening with my ldap_search 
calls. It isn't working like it used to. Anyone have any ideas? When I revert to 4.2.3 
it works fine.

<>< Ryan


Ryan Jameson
Software Development Services Manager 
International Bible Society
W (719) 867-2692

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




RE: [PHP-DB] If select query doesn't net any results

2003-01-09 Thread Ryan Jameson (USA)
if (mysql_num_rows($result) < 1) {
  //do stuff
}

This is only this easy with mySQL... :-)

<>< Ryan

-Original Message-
From: Michael Cortes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 11:07 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] If select query doesn't net any results


I am a programming novice and just created my first php application.  However I have a 
situation I 
don't know the answer to.


My db queries (mysql) are written like this:

$qtrans= "select * from $table where (conditionals) order by some field";

$link=mysql_connect ($host, $user, $password);

$result=mysql_db_query($dbname, $qtrans, $link);

while ($row = mysql_fetch_array($result))   {

do stuff with the array here

}



I would like to created an if statement that only occurs if the query gets a result.  
If there are 
no records that meet the query conditionals and my array ends up with null, I do not 
want my if 
statement to take place.

Is this easy enough to do?  Any help would be great.

Thank you,




Michael Cortes
Fort LeBoeuf School District
34 East 9th Street
PO Box 810
Waterford PA 16411-0810
814.796.4795
Fax1 814.796.3358
Fax2 978-389-1258


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

2003-01-08 Thread Ryan Jameson (USA)
Well, I figured it out. New files in the dlls directory and not in the path. The error 
message sent me on a wild goose chase.

:-\ Sorry...

-Original Message-
From: Ryan Jameson (USA) 
Sent: Tuesday, January 07, 2003 6:02 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] PHP 4.3 problem


More info on this:

I tried to create a root directory c:\extensions and put the module in there on the 
off chance that the bug in 4.3 comes from the space in the directory path. It didn't 
help. Nothing seemed to work. If I comment out the line to load the module everything 
works fine (except for the ldap calls).

Anyway, I hunted the archives and no answer, has anyone had any luck moving to 4.3 on 
IIS?

<>< Ryan



-Original Message-----
From: Ryan Jameson (USA) 
Sent: Tuesday, January 07, 2003 5:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] PHP 4.3 problem


using the same extensions path as the previous version I get:

Content-type: text/html X-Powered-By: PHP/4.3.0 PHP Warning: Unknown(): Unable to load 
dynamic library 'C:\Program Files\PHP\extensions\php_ldap.dll' - The specified module 
could not be found. in Unknown on line 0  

when using PHP 4.3 ... anyone know why?

<>< Ryan

-- 
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] PHP 4.3 problem

2003-01-07 Thread Ryan Jameson (USA)
More info on this:

I tried to create a root directory c:\extensions and put the module in there on the 
off chance that the bug in 4.3 comes from the space in the directory path. It didn't 
help. Nothing seemed to work. If I comment out the line to load the module everything 
works fine (except for the ldap calls).

Anyway, I hunted the archives and no answer, has anyone had any luck moving to 4.3 on 
IIS?

<>< Ryan



-Original Message-----
From: Ryan Jameson (USA) 
Sent: Tuesday, January 07, 2003 5:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] PHP 4.3 problem


using the same extensions path as the previous version I get:

Content-type: text/html X-Powered-By: PHP/4.3.0 PHP Warning: Unknown(): Unable to load 
dynamic library 'C:\Program Files\PHP\extensions\php_ldap.dll' - The specified module 
could not be found. in Unknown on line 0  

when using PHP 4.3 ... anyone know why?

<>< Ryan

-- 
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] PHP 4.3 problem

2003-01-07 Thread Ryan Jameson (USA)
using the same extensions path as the previous version I get:

Content-type: text/html X-Powered-By: PHP/4.3.0 PHP Warning: Unknown(): Unable to load 
dynamic library 'C:\Program Files\PHP\extensions\php_ldap.dll' - The specified module 
could not be found. in Unknown on line 0  

when using PHP 4.3 ... anyone know why?

<>< Ryan

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




RE: [PHP-DB] Please help - Managing relational tables using PHP

2003-01-02 Thread Ryan Jameson (USA)
You need to realize that phpMyAdmin is a database manangement tool, not a database. So 
I'll answer your questions based on the mySQL database ... 

1. MySQL 3.23.43b introduced a table type of InnoDB which is the first to allow 
foreign key constraints. http://www.mysql.com/doc/en/SEC448.html  ... However, you do 
not need to enforce constraints to have a relationship. I just assume that's what 
you're getting at.

2. Yes, if you enforce constraints with the CASCADE option it will. ..see same 
document: http://www.mysql.com/doc/en/SEC448.html


... Now the catch, my version of phpMyAdmin 2.3.0 does not allow me to choose the 
table type of InnoDB, even though my database is version 3.23.54. So I assume 
phpMyAdmin does not allow one to manage these attributes. Someone please correct me if 
I'm wrong.

<>< Ryan



-Original Message-
From: Phanivas Vemuri [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 12:50 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] Please help - Managing relational tables using PHP


hi all,
1. How does phpMyAdmin manage tables with "one to many" or "many to one" 
relation ships. Is there any documentation about this.
--or-
2. Does phpMyAdmin support editing data from more than one table that have a 
one to many or many to one relationship.

Thanks and Wish you a happy new year,
Phani.

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


-- 
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] What's wrong with my update query select works, but update doesn't?

2002-12-26 Thread Ryan Jameson (USA)
Well, it seems to me that if these two happen within the same scope level (same 
function, same class) which I cannot verify based on what you gave us, the $fgNumber 
should not be empty. Therefore I'd bet there's some code in between that reinitializes 
$fgNumber or the update is in a function that does not have access to the $fgNumber. 
You can give a function access to that variable by declaring it global inside of the 
function, or passing it as a variable.

<>< Ryan

-Original Message-
From: Michael Knauf/Niles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 1:41 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] What's wrong with my update query select works,
but update doesn't?



Here's the code: with some extraneous html removed to make it easier to
read...



 7) {
  echo "bad fg number";
  }
  else {
  $fgNumber =$switchfg ;
  echo $fgNumber;
}}
?>


This works... I added the echo statement in the last line for debugging
purposes, the page does indeed display the fgNumber, and uses the variable
to perform other queries, which also work... until I try to update the
database




Again, that last line is a debugging entry, and it echoes back the query
I'm expecting, except that the variable $fgNumber looses it's value
somewhere and the query looks like this:

UPDATE products SET productName='ZR-4630 MultiZone Receiver',
productDescription='4-Source 6-Zone Receiver with AM/FM Tuner' where
fgNumber='' limit 1

I expect it to say " where fgNumber='FG00813"

Here's the form that triggers the update







Products Table




ID:

FG#:

Name:

Description



Update Product Information





I keep looking for an error and not finding one, am I missing something
obvious?

Michael




-- 
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] postgresql vs mysql

2002-12-26 Thread Ryan Jameson (USA)
There's a substantiated rumor that says postgres is faster for complex queries.

<>< Ryan

-Original Message-
From: Ellen Solomon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 12:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] postgresql vs mysql


I'm starting a project for which the lead programmer wants to use
postgresql.  I'll be working in php.  Any major disadvantages to
postgresql over mysql, other than mysql seems to be more widespread?

TIA
Ellen


-- 
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] Re: NewB: Return New Record ID...

2002-12-26 Thread Ryan Jameson (USA)
Ok, this does work through ODBC as 2 seperate queries. This seems like a safer way to 
do it.
I was trying to make it work as one insert query that returned the id. That was when I 
got the strange error message. Thanks!

<>< Ryan


-Original Message-
From: Bernain, Fernando G. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 10:54 AM
To: Ryan Jameson (USA)
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


It's not a bad idea to encapsulate de querys (selects, updates, inserts,...)
in SPs...

Good luck with the select max()!!!

PD: If you dont want/can use identitys, maybe you can use another table
where you store de next number of transaction. So its easy to update this
number (plus one) and make a select inmediatley to obtein the number... its
a bit strange but it works!!!

Buena suerte!!!

Fernando Bernain
Senior A
Business Process Outsourcing

KPMG Argentina
Tel: 54 11 4316 5754
Fax: 54 11 4316 5734
[EMAIL PROTECTED]




-Original Message-----
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 2:46 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


The problem is I have hundreds of tables each with a different column list
and syntax, I don't want to have to create a SP for each table. There really
has to be an easy way to do this. Now my sql server is saying this:

Connection is busy with results for another hstmt, SQL state S1000

. it looks like I'll have to take my chances with select max() 

<>< Ryan

-Original Message-
From: Bernain, Fernando G. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 10:43 AM
To: Ryan Jameson (USA)
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


You can use this inside an stored procedure, for instance:

CREATE PROCEDURE SP_INSERT_TRANSACCION
@transacfecha datetime,
@observacion char(100)
 AS
INSERT INTO Transaccion(transacfecha, observacion)
VALUES(
@transacfecha,
@observacion
)
SELECT @@IDENTITY AS 'nrotrans'
END

In this example, I insert two values with this sp in a table with and
Identity column. So, the SP return the value of the transaccion generated...
You've got the idea???


Fernando Bernain
Senior A
Business Process Outsourcing

KPMG Argentina
Tel: 54 11 4316 5754
Fax: 54 11 4316 5734
[EMAIL PROTECTED]




-----Original Message-
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 2:36 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


This doesn't work as expected through ODBC... it does not seem to return any
value...

<>< Ryan

-Original Message-
From: Bernain, Fernando G. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 10:09 AM
To: Ryan Jameson (USA)
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


This is from de books online (MSSQL).

@@IDENTITY (T-SQL)
Returns the last-inserted identity value. 

Syntax
@@IDENTITY

Return Types
numeric

Remarks
After an INSERT, SELECT INTO, or bulk copy statement completes, @@IDENTITY
contains the last identity value generated by the statement. If the
statement did not affect any tables with identity columns, @@IDENTITY
returns NULL. If multiple rows are inserted, generating multiple identity
values, @@IDENTITY returns the last identity value generated. If the
statement fires one or more triggers that perform inserts that generate
identity values, calling @@IDENTITY immediately after the statement returns
the last identity value generated by the triggers. The @@IDENTITY value does
not revert to a previous setting if the INSERT or SELECT INTO statement or
bulk copy fails, or if the transaction is rolled back.

Examples
This example inserts a row into a table with an identity column and uses
@@IDENTITY to display the identity value used in the new row.

INSERT INTO jobs (job_desc,min_lvl,max_lvl)

VALUES ('Accountant',12,125)

SELECT @@IDENTITY AS 'Identity'

  

Fernando Bernain
Senior A
Business Process Outsourcing

KPMG Argentina
Tel: 54 11 4316 5754
Fax: 54 11 4316 5734
[EMAIL PROTECTED]




-Original Message-
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 2:06 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


for MS SQL and Oracle does anyone know a more reliable way to do this than
select max(ID) immediately after the insert? It seems silly that I'd have to
take my chances that another has been inserted in between.

<>< Ryan

-Original Message-
From: J.Veenhuijsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 1:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: NewB: Return New Record ID...


Try $last=mysql_insert_id();

Jochem

Doug Coning wrote:
> Hi all,
> 
> How do I do this:
> 
> I need a PHP page that simpl

RE: [PHP-DB] Re: NewB: Return New Record ID...

2002-12-26 Thread Ryan Jameson (USA)
The problem is I have hundreds of tables each with a different column list and syntax, 
I don't want to have to create a SP for each table. There really has to be an easy way 
to do this. Now my sql server is saying this:

Connection is busy with results for another hstmt, SQL state S1000

. it looks like I'll have to take my chances with select max() 

<>< Ryan

-Original Message-
From: Bernain, Fernando G. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 10:43 AM
To: Ryan Jameson (USA)
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


You can use this inside an stored procedure, for instance:

CREATE PROCEDURE SP_INSERT_TRANSACCION
@transacfecha datetime,
@observacion char(100)
 AS
INSERT INTO Transaccion(transacfecha, observacion)
VALUES(
@transacfecha,
@observacion
)
SELECT @@IDENTITY AS 'nrotrans'
END

In this example, I insert two values with this sp in a table with and
Identity column. So, the SP return the value of the transaccion generated...
You've got the idea???


Fernando Bernain
Senior A
Business Process Outsourcing

KPMG Argentina
Tel: 54 11 4316 5754
Fax: 54 11 4316 5734
[EMAIL PROTECTED]




-----Original Message-
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 2:36 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


This doesn't work as expected through ODBC... it does not seem to return any
value...

<>< Ryan

-Original Message-
From: Bernain, Fernando G. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 10:09 AM
To: Ryan Jameson (USA)
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


This is from de books online (MSSQL).

@@IDENTITY (T-SQL)
Returns the last-inserted identity value. 

Syntax
@@IDENTITY

Return Types
numeric

Remarks
After an INSERT, SELECT INTO, or bulk copy statement completes, @@IDENTITY
contains the last identity value generated by the statement. If the
statement did not affect any tables with identity columns, @@IDENTITY
returns NULL. If multiple rows are inserted, generating multiple identity
values, @@IDENTITY returns the last identity value generated. If the
statement fires one or more triggers that perform inserts that generate
identity values, calling @@IDENTITY immediately after the statement returns
the last identity value generated by the triggers. The @@IDENTITY value does
not revert to a previous setting if the INSERT or SELECT INTO statement or
bulk copy fails, or if the transaction is rolled back.

Examples
This example inserts a row into a table with an identity column and uses
@@IDENTITY to display the identity value used in the new row.

INSERT INTO jobs (job_desc,min_lvl,max_lvl)

VALUES ('Accountant',12,125)

SELECT @@IDENTITY AS 'Identity'

  

Fernando Bernain
Senior A
Business Process Outsourcing

KPMG Argentina
Tel: 54 11 4316 5754
Fax: 54 11 4316 5734
[EMAIL PROTECTED]




-Original Message-
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 2:06 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


for MS SQL and Oracle does anyone know a more reliable way to do this than
select max(ID) immediately after the insert? It seems silly that I'd have to
take my chances that another has been inserted in between.

<>< Ryan

-Original Message-
From: J.Veenhuijsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 1:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: NewB: Return New Record ID...


Try $last=mysql_insert_id();

Jochem

Doug Coning wrote:
> Hi all,
> 
> How do I do this:
> 
> I need a PHP page that simply creates a "blank" record so that I have the
> record's ID (which is automatically generated).  That same page then needs
> to return the record ID back so that I know what the ID is.  I will later
> allow that record's information to be populated based on the ID it first
> returned.
> 
> How would I do this?
> 
> Thank you, thank you!
> 
> Doug Coning
> 
> 
> 


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


Email Disclaimer

The information in this email is confidential and may be
legally privileged.
It is intended solely for the addressee.
Access to this email by anyone else is unauthorised.
If you are not the intended recipient, any disclosure,
copying, distribution
or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful.
When addressed to our clients any opinions or advice
contained in this email are subject to the terms and
conditions expressed in the governing KPMG client engagement
letter.


-- 
PHP Database Mailing Li

RE: [PHP-DB] Re: NewB: Return New Record ID...

2002-12-26 Thread Ryan Jameson (USA)
This doesn't work as expected through ODBC... it does not seem to return any value...

<>< Ryan

-Original Message-
From: Bernain, Fernando G. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 10:09 AM
To: Ryan Jameson (USA)
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


This is from de books online (MSSQL).

@@IDENTITY (T-SQL)
Returns the last-inserted identity value. 

Syntax
@@IDENTITY

Return Types
numeric

Remarks
After an INSERT, SELECT INTO, or bulk copy statement completes, @@IDENTITY
contains the last identity value generated by the statement. If the
statement did not affect any tables with identity columns, @@IDENTITY
returns NULL. If multiple rows are inserted, generating multiple identity
values, @@IDENTITY returns the last identity value generated. If the
statement fires one or more triggers that perform inserts that generate
identity values, calling @@IDENTITY immediately after the statement returns
the last identity value generated by the triggers. The @@IDENTITY value does
not revert to a previous setting if the INSERT or SELECT INTO statement or
bulk copy fails, or if the transaction is rolled back.

Examples
This example inserts a row into a table with an identity column and uses
@@IDENTITY to display the identity value used in the new row.

INSERT INTO jobs (job_desc,min_lvl,max_lvl)

VALUES ('Accountant',12,125)

SELECT @@IDENTITY AS 'Identity'

  

Fernando Bernain
Senior A
Business Process Outsourcing

KPMG Argentina
Tel: 54 11 4316 5754
Fax: 54 11 4316 5734
[EMAIL PROTECTED]




-----Original Message-
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 2:06 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: NewB: Return New Record ID...


for MS SQL and Oracle does anyone know a more reliable way to do this than
select max(ID) immediately after the insert? It seems silly that I'd have to
take my chances that another has been inserted in between.

<>< Ryan

-Original Message-
From: J.Veenhuijsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 1:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: NewB: Return New Record ID...


Try $last=mysql_insert_id();

Jochem

Doug Coning wrote:
> Hi all,
> 
> How do I do this:
> 
> I need a PHP page that simply creates a "blank" record so that I have the
> record's ID (which is automatically generated).  That same page then needs
> to return the record ID back so that I know what the ID is.  I will later
> allow that record's information to be populated based on the ID it first
> returned.
> 
> How would I do this?
> 
> Thank you, thank you!
> 
> Doug Coning
> 
> 
> 


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


Email Disclaimer

The information in this email is confidential and may be
legally privileged.
It is intended solely for the addressee.
Access to this email by anyone else is unauthorised.
If you are not the intended recipient, any disclosure,
copying, distribution
or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful.
When addressed to our clients any opinions or advice
contained in this email are subject to the terms and
conditions expressed in the governing KPMG client engagement
letter.


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




RE: [PHP-DB] Re: NewB: Return New Record ID...

2002-12-26 Thread Ryan Jameson (USA)
for MS SQL and Oracle does anyone know a more reliable way to do this than select 
max(ID) immediately after the insert? It seems silly that I'd have to take my chances 
that another has been inserted in between.

<>< Ryan

-Original Message-
From: J.Veenhuijsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 1:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: NewB: Return New Record ID...


Try $last=mysql_insert_id();

Jochem

Doug Coning wrote:
> Hi all,
> 
> How do I do this:
> 
> I need a PHP page that simply creates a "blank" record so that I have the
> record's ID (which is automatically generated).  That same page then needs
> to return the record ID back so that I know what the ID is.  I will later
> allow that record's information to be populated based on the ID it first
> returned.
> 
> How would I do this?
> 
> Thank you, thank you!
> 
> Doug Coning
> 
> 
> 


-- 
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] FW: Oracle connectivity question...

2002-12-18 Thread Ryan Jameson (USA)
Yeah, on the server you should be able to type tnsping and your tnsname to make sure 
it is configured correctly.

<>< Ryan

-Original Message-
From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 10:05 AM
To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED]
Subject: Re: [PHP-DB] FW: Oracle connectivity question...


  Hey,

A friend of mine told me that :
kalo 19:02: trjanbva ti

tnsping vdb.masq

kalo 19:02: uf.. ne znam kak ce nastrojva tnslistaner-a..;(

kalo 19:03: ima si programa s kojato se pipat nastraojkite na TNSListener-a

kalo 19:03: ina4e ne mozesh ada se zaka4ish..


Translared to english :
19:02 You need
tnsping the_machine
19:03 : uff, I don't know how to setup the tnslistener
19:03 : there is a program to change the setting of TNSListener
19:03 : otherwise you can't connect


If this helps you :))

Andrey

- Original Mesage -
From: "NIPP, SCOTT V (SBCSI)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 6:51 PM
Subject: [PHP-DB] FW: Oracle connectivity question...


> More information on the problem...  I tried including the SID in the
> OCILogon function and think that I may have gotten a bit further, but
still
> not a successful logon.  Here is the error I am now receiving with the
SID:
>
> Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name
in
> /www/DW/oratest.php on line 11
> Unable to logon to database.
> Thanks agian.
>
> >  -Original Message-
> > From: NIPP, SCOTT V (SBCSI)
> > Sent: Wednesday, December 18, 2002 10:30 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: Oracle connectivity question...
> >
> > OK.  I think I now have Oracle support built into PHP/Apache.  The
> > biggest hiccup for HP-UX seems to be that once you add Oracle support to
> > PHP, you CANNOT built PHP as a DSO, PHP MUST be compiled into Apache.
> > Once again, I think this is the case, I am still not completely sure at
> > this point.
> >
> > I am now receiving an error on trying to connect to the Oracle
> > database that I do not understand, but leads me to believe that the PHP
> > Oracle support is functioning.  Here is the code I am attempting:
> >
> >  > $connection = OCILogon("userid", "password") or die ("Unable to logon to
> > database.");
> > # phpinfo();
> > ?>
> >
> > Here is the error I am receiving:
> >
> > Warning: OCISessionBegin: ORA-01034: ORACLE not available in
> > /www/DW/oratest.php on line 10
> > Unable to logon to database.
> > The code I am attempting is simply to verify successful connectivity
> > to the database.  I know that this doesn't really do anything, but I am
> > trying this simply to test for a successful connection.  Please let me
> > know if you have any ideas or suggestions.  Thanks again.
> >
> > Scott Nipp
> > Phone:  (214) 858-1289
> > E-mail:  [EMAIL PROTECTED]
> > Web:  http:\\ldsa.sbcld.sbc.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


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




RE: [PHP-DB] Now not selecting enough

2002-12-18 Thread Ryan Jameson (USA)
Your echo needs to be in the while loop...
<>< Ryan

-Original Message-
From: Alex Francis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 10:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Now not selecting enough


I am using the following script which I have used with minor variations,
several times before without any trouble. I have 3 items in my database but
the script only returns 1. I can change which one by leaving off the order
by filter, but can't get all three. Where am I going wrong. (PHP and MySQL).
$SQL = 'SELECT id, DATE_FORMAT(meetingdate, "%D %M %Y")as mtgdate FROM
boardprevious order by meetingdate desc ';

// execute SQL statement
$ret = mysql_db_query($dbname,$SQL,$link);

if (!$ret) { echo( mysql_error()); }
else {

// retrieve values

while ($row = mysql_fetch_array($ret)) {
$meetingdate = $row[mtgdate];
$id = $row[id];
}
}
echo ("$meetingdate");




-- 
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] Oracle/PHP question...

2002-12-16 Thread Ryan Jameson (USA)
BTW... I'm not the one stuck trying to figure out how to recompile my current version 
of PHP to include the oci functions... haha! And guess what, with every release you 
get to do it all over again... so polish up on the shell scripting unless you want to 
reinvent the wheel every month or two. :-D

<>< Ryan

-Original Message-----
From: Ryan Jameson (USA) 
Sent: Monday, December 16, 2002 2:15 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Oracle/PHP question...


:-) ... Windows is the best at running the C# .NET applications I have to build to 
:make everyone happy that we are "industry standard" ... when big brother is not 
:looking I use PHP for everything I can get away with. I'm actually very impressed 
:with how easily PHP integrates into an IIS / MSSQL environment (in CGI mode that is) 
:... it has been quite stable and believe it or not upgrades don't require a reboot!!! 
:I have even called the php parser directly from sql server dts packages & agent 
:jobs... PHP is much more powerful then anything m$ offers.

<>< Ryan

-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 2:08 PM
To: Ryan Jameson (USA); [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Oracle/PHP question...


Thanks, but my web server is HP-UX.

Didn't anyone ever tell you Win-blows sucks?  :)

-Original Message-
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 3:07 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Oracle/PHP question...


If your webserver is win32 then you need to uncomment the line in php.ini
that says :

;extension=php_oci8.dll

 if it is unix based I am not sure what you need to do.

<>< Ryan

-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 1:58 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] Oracle/PHP question...


I am now trying to setup connectivity to a remote Oracle database
for my PHP/Apache web server.  I am attempting to verify connectivity to the
database by:



I have installed the Oracle client on the system, and I have also
setup the ORACLE_HOME and ORACLE_SID environment variables.  Unfortunately
at this point I am not even able to make a successful connection to the
Oracle database.  I am currently receiving the following error:

Fatal error: Call to undefined function: ocilogon() in /www/DW/oratest.php
on line 10

Do I need to recompile PHP to be Oracle aware or something?  What is
it I am missing at this point?  Thanks in advance.
Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.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

-- 
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] Oracle/PHP question...

2002-12-16 Thread Ryan Jameson (USA)
:-) ... Windows is the best at running the C# .NET applications I have to build to 
:make everyone happy that we are "industry standard" ... when big brother is not 
:looking I use PHP for everything I can get away with. I'm actually very impressed 
:with how easily PHP integrates into an IIS / MSSQL environment (in CGI mode that is) 
:... it has been quite stable and believe it or not upgrades don't require a reboot!!! 
:I have even called the php parser directly from sql server dts packages & agent 
:jobs... PHP is much more powerful then anything m$ offers.

<>< Ryan

-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 2:08 PM
To: Ryan Jameson (USA); [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Oracle/PHP question...


Thanks, but my web server is HP-UX.

Didn't anyone ever tell you Win-blows sucks?  :)

-Original Message-
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 3:07 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Oracle/PHP question...


If your webserver is win32 then you need to uncomment the line in php.ini
that says :

;extension=php_oci8.dll

 if it is unix based I am not sure what you need to do.

<>< Ryan

-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 1:58 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] Oracle/PHP question...


I am now trying to setup connectivity to a remote Oracle database
for my PHP/Apache web server.  I am attempting to verify connectivity to the
database by:



I have installed the Oracle client on the system, and I have also
setup the ORACLE_HOME and ORACLE_SID environment variables.  Unfortunately
at this point I am not even able to make a successful connection to the
Oracle database.  I am currently receiving the following error:

Fatal error: Call to undefined function: ocilogon() in /www/DW/oratest.php
on line 10

Do I need to recompile PHP to be Oracle aware or something?  What is
it I am missing at this point?  Thanks in advance.
Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.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

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




RE: [PHP-DB] Oracle/PHP question...

2002-12-16 Thread Ryan Jameson (USA)
If your webserver is win32 then you need to uncomment the line in php.ini that says :

;extension=php_oci8.dll

 if it is unix based I am not sure what you need to do.

<>< Ryan

-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 1:58 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] Oracle/PHP question...


I am now trying to setup connectivity to a remote Oracle database
for my PHP/Apache web server.  I am attempting to verify connectivity to the
database by:



I have installed the Oracle client on the system, and I have also
setup the ORACLE_HOME and ORACLE_SID environment variables.  Unfortunately
at this point I am not even able to make a successful connection to the
Oracle database.  I am currently receiving the following error:

Fatal error: Call to undefined function: ocilogon() in /www/DW/oratest.php
on line 10

Do I need to recompile PHP to be Oracle aware or something?  What is
it I am missing at this point?  Thanks in advance.
Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.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




FW: [PHP-DB] A help on relational databases using php

2002-12-12 Thread Ryan Jameson (USA)
Phanivas Vemuri said:
---
I have two tables.
1.ProgramClips ( id, progSummary, category, videoFile)PRIMkey = id.
and each id may have 2 or three categories.

2.Category( number,category).
categories are :
Beef , diary, horticulture etc;

I am using PhpMyAdmin as the interface for the mySql Database.
The PhpMyAdmin creates a text filed to show the values of the category.

Where as I want to replace the text field to put a  drop dwon list which can 
select multiple categories.
There is no relation between the two tables.
PLease mail me .. if u dont understand the question. I wiill explain it more 
clearly as it is verry importnat for me to solve it.
Phani.




>From: "Ryan Jameson (USA)" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: RE: [PHP-DB] A help on relational databases using php
>Date: Thu, 12 Dec 2002 13:29:25 -0700
>
>Ok, you've come to the right place, so what exactly is the question?
>
><>< Ryan
>
>-Original Message-
>From: Phanivas Vemuri [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, December 12, 2002 1:26 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-DB] A help on relational databases using php
>
>
>hi all,
>i need some help regarding soem one who had worked on relational databases
>suing php as the interface.
>Phani.
>
>_
>MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
>http://join.msn.com/?page=features/virus
>
>
>--
>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


_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus


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




RE: [PHP-DB] A help on relational databases using php

2002-12-12 Thread Ryan Jameson (USA)
Ok, you've come to the right place, so what exactly is the question?

<>< Ryan

-Original Message-
From: Phanivas Vemuri [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 12, 2002 1:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] A help on relational databases using php


hi all,
i need some help regarding soem one who had worked on relational databases 
suing php as the interface.
Phani.

_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus


-- 
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] Remote Oracle database questions...

2002-12-11 Thread Ryan Jameson (USA)
One thing I can help with is TNSNAME. It was very confusing for me at first, it's kind 
of like an alias on steroids... It is a necessary part of connecting to an Oracle 
server. TNSNAMES are declared in a file called... go figure... tnsnames. Even good 
Oracle DBAs run into confusion because the tnsnames file (on the connecting client) 
can get huge. As far as how PHP does it, I'd ASSUME that the Oracle client would have 
to be installed on the server PHP is running on. Upon installing the Oracle client it 
will create the tnsnames file and set the ORACLE_HOME environment variable, the file 
needs a reference to the server you wish to connect to. I haven't used Oracle since 8i 
came out... but I'm pretty sure this is accurate. Except the guess about how PHP does 
it.

<>< Ryan

-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 9:24 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] Remote Oracle database questions...


I have now been granted access to a remote Oracle database that I
need to query.  All of the work that I have done with databases and PHP has
been focused on MySQL, does anyone know of a good tutorial for PHP with
Oracle?  My immediate question is how do I get logged into the remote
database to perform my query?  I notice that there is a Oracle function in
PHP called ora_logon.  This function description mentions something about
logging in using 'user@TNSNAME'.  I am pretty confused by what this means.
Thanks in advance for the help.

Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.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] services in php/mysql

2002-12-11 Thread Ryan Jameson (USA)
i've done this in a couple ways... If you are running linux you can set up a cron job 
to run regularly. You can also configure a remote machine to fire the job by using a 
command line browser like wget. A lot depends on what's available to you.

<>< Ryan

-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 7:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] services in php/mysql


I may be able to get my upload problem fixed by the vb app connecting to our
db and pumping over the data.  Can I set up a php page or service in mysql
that once an hour, day, etc runs a clean up script?

Thanks,
Eddie


-- 
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] Crystal Report -> PHP4 / Report Generator

2002-12-11 Thread Ryan Jameson (USA)
If you're still using MSSQL7, I'd recommend installing Crystal Enterprise on the 
winApache machine. There's no reason that you need to give up Crystal to change to 
PHP. If you're looking for a freeware solution, good luck. Let me know if you find 
anything good. I looked to replace crystal about 6 months ago and couldn't find 
anything even close to as powerful.

<>< Ryan

-Original Message-
From: Bernain, Fernando G. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 6:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Crystal Report -> PHP4 / Report Generator 


I'm working in a migration of an application from MSSQL7-VB6.0-Crystal
Reports to MSSQL7-winApache-PHP4. 
I'm having problems with the reporting, because I cant find an "user
friendly" solution for the creation of reports with PHP (I need something
similar in functionality and look and fell to the Crystal Reports). 
I tried with a class "report" wrote in PHP4 but I saw that I'll have a long
way to obtain a minimum level of functionality... 

Am I following the correct way in solving this problem??? 
Have anybody of you developed something similar to a Report Generator???
Does exist any application that I could use??? 

Thanks

Fernando Bernain
Senior A
Business Process Outsourcing

KPMG Argentina
Tel: 54 11 4316 5754
Fax: 54 11 4316 5734
[EMAIL PROTECTED]





Email Disclaimer

The information in this email is confidential and may be
legally privileged.
It is intended solely for the addressee.
Access to this email by anyone else is unauthorised.
If you are not the intended recipient, any disclosure,
copying, distribution
or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful.
When addressed to our clients any opinions or advice
contained in this email are subject to the terms and
conditions expressed in the governing KPMG client engagement
letter.


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

2002-12-10 Thread Ryan Jameson (USA)
Try the mail function, you can get creative and use html as well. It's documented:

http://www.php.net/manual/en/function.mail.php

<>< Ryan

-Original Message-
From: Ryan Holowaychuk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 4:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] email form


I am trying to figure out how to take the data that I have collected in
a form and format it into another page basically a bunch of tables and
graphics, and then email that form to a specific email address.

I have been able to get it to collect, place into the page, but now how
to email the complete form??

Does anybody have an idea???

Thanks
Ryan



-- 
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] read a file from local harddisk

2002-12-10 Thread Ryan Jameson (USA)
I won't even ask why... but if you started a webserver on your local machine the 
file() function does allow you to use http .. so file("http://mymachine/myfile.txt";); 
that's one way.

The other way is to upload the file using HTTP.

Neither of these ways are very secure.

<>< Ryan

-Original Message-
From: dufronte [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 11:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] read a file from local harddisk



HI... sorry to interrupt again...

I have another ridiculous question...

I have a text file in my machine... and a php-file in my host (such as
host.sk etc..)
I want to use my php-file to access my text file in my machine
directly... 
I used fopen, and fread stuff... but didn't work

Btw, can somebody help my with this I want to know how to access my
local file in Windows and Linux remotely... or it can risk some security
problem ???
Please... help me...

---DuFronte---
 
http://binusti2002.net.tc



-- 
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] passing variables

2002-12-09 Thread Ryan Jameson (USA)
You are absolutely correct. However, the only value that security "feature" has is in 
the case that the program really cares which method the variable was received. I never 
have, and I doubt I ever will. I have had cases where I thought I'd be concerned with 
this but a rethink of the logic proved there was a better way. Even if I am concerned 
with such an issue I can always check the post array to make sure it is there.

The decision to default to 'off' was a good one, but it only protects certain types of 
programmers from accidentally creating holes. I am a bit more deliberate, and see no 
security value in it for myself. Therefore my installations remain 
register_globals="on"...

If you'd like to pass your username and password on a query string be my guest, it'll 
work just fine. I don't recommend it though.

<>< Ryan

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:51 AM
To: Ryan Jameson (USA); [EMAIL PROTECTED]
Subject: RE: [PHP-DB] passing variables



--- "Ryan Jameson (USA)" <[EMAIL PROTECTED]> wrote:
> I missed the part where he was using an image. Without a value
> property, I don't see how it could pass anything at all
> 
> A note on my recent post, to emulate register_globals do this:
> 
> if (!empty($_SERVER))
>   extract($_SERVER);
>   
> if (!empty($_GET)) {
> extract($_GET);
> } else if (!empty($HTTP_GET_VARS)) {
> extract($HTTP_GET_VARS);
> }
> 
> if (!empty($_POST)) {
> extract($_POST);
> } else if (!empty($HTTP_POST_VARS)) {
> extract($HTTP_POST_VARS);
> }
> 
> 
> This registers all of the different arrays.

And completely nullifies the security value of having
register_globals turned off. But I guess if you don't have access to
the php.ini file this is as good...

> <>< Ryan
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
-Stolen from the now-defunct Randy's Random mailing list.
***

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




RE: [PHP-DB] passing variables

2002-12-09 Thread Ryan Jameson (USA)
I missed the part where he was using an image. Without a value property, I don't see 
how it could pass anything at all

A note on my recent post, to emulate register_globals do this:

if (!empty($_SERVER))
  extract($_SERVER);
  
if (!empty($_GET)) {
extract($_GET);
} else if (!empty($HTTP_GET_VARS)) {
extract($HTTP_GET_VARS);
}

if (!empty($_POST)) {
extract($_POST);
} else if (!empty($HTTP_POST_VARS)) {
extract($HTTP_POST_VARS);
}


This registers all of the different arrays.

<>< Ryan

-Original Message-
From: Jonathan [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 8:40 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] passing variables


One of many possible things.

Dependent on the version of PHP you are using, you might have
register_globals set to off in your php.ini file, which is preferable.
In which case you'll have to use

If($_REQUEST['variable'])

Or

If(isset($_REQUEST['variable']))

Second possible is:

I've never really used an image within a link to submit a form.  What I
usually do is make the image a submit button, e.g., You could
name it or create a hidden field 

Then upon form submission ()
You would look for register

If(isset($_REQUEST['register']))
{
//whatever
}
hope one of them works.

-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 9:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] passing variables

Hello all,

I have a login/register screen for my php/mysql db.  When the page
opens,
the user sees the log in screen but I have a button and reloads the same
page, hopefully with the register screen.  I know I can simply check to
see
if a variable is set with

if ($variable){} .  This does not seem to work when I give an image a
name
and link it to the same page.  The image is named register and it links
back
to the same page, so the page loads, I click on the register image , the
page reloads but the variable is not set.


Any ideas?

Thanks,
Eddie


-- 
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] passing variables

2002-12-09 Thread Ryan Jameson (USA)
You may need to look in the global array. The more recent versions of PHP default to 
register_globals off ... which means that form variables do not turn into individual 
variables, but they are still in their respective arrays $_SERVER,$_GET,$_POST ... 
depending on the method your using it will be in either get or post.

<>< Ryan



-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 9:03 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] passing variables


That's just it, for some reason the variable isn't being set.

Here is the code:
When the page loads, the form loads under
  if (!$login_clients and !$register_clients){

When I click the minus.gif image, I want the page to reload with the other
code but it still loads the form under
  if (!$login_clients and !$register_clients){

If I use isset it does the same thing.

Thanks!
Eddie








 
 
  
  
  
   User
Name:
   
  
   Password:
   
  
  
  


 




  
  

  First
Name:
  


  Last Name:

  


  Address:
  


  City:

  


  
  State:

  


  
  Zip

  



  Telephone
Number:
  


  Fax
Number:
  


  e-mail
address:
  


  Confirm
E-mail:
  


  Username:
  


  Password:
  

  
  









-Original Message-
From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:09 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] passing variables


I think you want:

if (isset($variable)){}

<>< Ryan

-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 8:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] passing variables


Hello all,

I have a login/register screen for my php/mysql db.  When the page opens,
the user sees the log in screen but I have a button and reloads the same
page, hopefully with the register screen.  I know I can simply check to see
if a variable is set with

if ($variable){} .  This does not seem to work when I give an image a name
and link it to the same page.  The image is named register and it links back
to the same page, so the page loads, I click on the register image , the
page reloads but the variable is not set.


Any ideas?

Thanks,
Eddie


--
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] passing variables

2002-12-09 Thread Ryan Jameson (USA)
I think you want:

if (isset($variable)){}

<>< Ryan

-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 8:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] passing variables


Hello all,

I have a login/register screen for my php/mysql db.  When the page opens,
the user sees the log in screen but I have a button and reloads the same
page, hopefully with the register screen.  I know I can simply check to see
if a variable is set with

if ($variable){} .  This does not seem to work when I give an image a name
and link it to the same page.  The image is named register and it links back
to the same page, so the page loads, I click on the register image , the
page reloads but the variable is not set.


Any ideas?

Thanks,
Eddie


-- 
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] Delay Confirmation....

2002-12-09 Thread Ryan Jameson (USA)
<<<<>>>>

Anyway... the what I was saying:

function wait10SecondsAndThenGoToADifferentPage(){
  setTimeout("window.location.href = 'pageYouWantThemOnWhenDone.php';",1);
}


<>< Ryan

-Original Message-
From: Ryan Jameson (USA) 
Sent: Monday, December 09, 2002 7:38 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Delay Confirmation


javascript seems to be a more likely candidate for this.

The function you'd use is:



-Original Message-
From: dufronte [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 7:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Delay Confirmation


Hi, I'm still new in PHP...,

I have some problem in using sleep() function.

Actually, I want to make a script that confirm the user to wait for 10
seconds before proceed to the next step. First the message "Please wait
for 10 seconds while we're processing your request..." will be shown to
user, then at the same time I want to delay the processing for 10
seconds with sleep() function.

This is my script :



But the result juz not like I wanted. The sleep runs before the message
shown up..., not before the query...  I think, sleep() is delayed a
whole scriptboth, the message and the query result are printed out
after 10 seconds... It makes me so confused

How could I fix it ??? Please help me...


--www.kapsul.org--
  DuFronte




-- 
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] Delay Confirmation....

2002-12-09 Thread Ryan Jameson (USA)
javascript seems to be a more likely candidate for this.

The function you'd use is:



-Original Message-
From: dufronte [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 7:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Delay Confirmation


Hi, I'm still new in PHP...,

I have some problem in using sleep() function.

Actually, I want to make a script that confirm the user to wait for 10
seconds before proceed to the next step. First the message "Please wait
for 10 seconds while we're processing your request..." will be shown to
user, then at the same time I want to delay the processing for 10
seconds with sleep() function.

This is my script :



But the result juz not like I wanted. The sleep runs before the message
shown up..., not before the query...  I think, sleep() is delayed a
whole scriptboth, the message and the query result are printed out
after 10 seconds... It makes me so confused

How could I fix it ??? Please help me...


--www.kapsul.org--
  DuFronte




-- 
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] NewB: Return New Record ID...

2002-12-05 Thread Ryan Jameson (USA)
mysql_insert_id if your using mysql

... most other ones you'll have to select max(id) from table after your insert.

<>< Ryan

-Original Message-
From: Doug Coning [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 2:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] NewB: Return New Record ID...


Hi all,

How do I do this:

I need a PHP page that simply creates a "blank" record so that I have the
record's ID (which is automatically generated).  That same page then needs
to return the record ID back so that I know what the ID is.  I will later
allow that record's information to be populated based on the ID it first
returned.

How would I do this?

Thank you, thank you!

Doug Coning




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


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




RE: [PHP-DB] MySQL Array

2002-12-05 Thread Ryan Jameson (USA)
while ($ar = mysql_fetch_array($rs))
  echo "". $ar['field1']."".$ar['field2']."";


Make sense?

-Original Message-
From: Art Chevalier [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 12:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Array


Hello,

I am pulling one column out of a MySQL table in an array.  I want to place
each element into a HTML table 4 rows across.  I am currently doing this
with the mysql_fetch_array() function. How can I pull out 4 array elements
in one pass through a while loop?

Thanks

Art Chevalier



-- 
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] Max execution time

2002-12-02 Thread Ryan Jameson (USA)
I'd use this:

set_time_limit (3600);

<>< Ryan

-Original Message-
From: Radovan Radic [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 8:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Max execution time


Hi all

(I post questions although i dont get answers, but i am trying. I must say i
dont give answers because i dont know much about php yet)

I have problems with script exceedded time. Script is executing mssql stored
procedure which executes about 5-6 mins. I need to execute it and then get
results in the file, but i allways get error about max execution time.
Customers wouldnt complain if script is executing too long if they could get
the results. I know i can set max.execution.time from php with ini_set().
But, i think i have read in the manual, that this directive doesnt affect
script execution time if script is running query. So even if i set
max_execution_time to 6mins could the script break? Could someone explain it
to me.

Radovan
PS. What means 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] PDFlib

2002-11-25 Thread Ryan Jameson (USA)
Is this for real? I never knew this either. I almost always send emails to the list by 
replying to old ones and changing the subject for new threads. I will remember this in 
the future if I create a thread.

I don't imagine Nikos and I are the only two who did not know this. Though I'm sure 
the habit of replying instead of creating a new email is not the norm either.

<>< Ryan 

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] PDFlib


On Monday 25 November 2002 23:19, nikos wrote:

> Hello everybody
> Does evrybody know if there is a free version of PDFlib
> Thanx
> Nikos

You have started a new thread by taking an existing posting and replying to
it while you changed the subject.


That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a "References:" header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view ("tree view") of the postings.


With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.


Always do a fresh post when you want to start a new thread. To achieve this,
click on "New message" instead of "Reply" within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.



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

2002-11-21 Thread Ryan Jameson (USA)
Has anyone gotten php_mcrypt working with the latest version of php on win32?

<>< Ryan

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




[PHP-DB] Access Violation in ISAPI version

2002-11-20 Thread Ryan Jameson (USA)
Has anyone else had problems with the error "PHP has encountered an Access Violation 
at 098029AE" ...

It's talked about at:
http://bugs.php.net/bug.php?id=15333 


The most frustrating thing is our ISP went above the call of duty to install PHP for 
me, and now his response is... well read for yourselves:

>>
I read through all the stuff at php.net.  The long and short of it is this:
Nobody really knows what is causing the problem. 
It appears to be a problem with a dual-processor machine (which is what you're using) 
It is believed that 4.2.3 solves the problem (that is the latest version and the 
version we are using) 
Setting the security model to "low" on the site helps in many cases (doesn't eliminate 
the problem, just reduces how often it occurs)

Ergo, this has been my problem with "public domain" scripting languages such as PHP.  
There is not a single source that can be held accountable for ensuring a problem is 
solved.  It is the reason that we have standardized on CF, because when it's bad, 
Macromedia HAS to fix it.
 
All that being said, and consistent with our terms of installation, I will take some 
time to see if I can "trim up" the configuration and improve the situation.  However, 
because this problem crashes the server completely, if we can't find a resolution 
soon, I will opt to remove it from the system.
 
One of our key responsibilities is system stability and reliability.  Again, I'll see 
if I can modify the config to alleviate this, however, the php resource was very 
little help.
>>

I'm pretty disappointed that this hasn't been fixed yet. Has anyone had any luck 
fixing it?

Thanks!
<>< Ryan

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




RE: [PHP-DB] HTML Forms question...

2002-11-19 Thread Ryan Jameson (USA)
You learn something new every day! I'll have to remember the [] thing.
My way of handling this situation that does not screw up JavaScript is to assign the 
names sequentially, so instead of all the checkboxes being system they would be 
system0,system1,... Since PHP is so wonderfully easy to use for referencing variable 
variable names I simply loop through:

for($i=0;$i";
  else
echo "$var is not checked.";
}

Since I always end up creating the form in PHP I just have the algorithm put a hidden 
field in the form that contains the number of checkboxes, in fact my PHP usually 
creates the JavaScript code as well, so it ends up being pretty flexible.

<>< Ryan


-Original Message-
From: Rich Gray [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 6:13 PM
To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED]
Subject: RE: [PHP-DB] HTML Forms question...


If you name the checkbox as name="system[]" then PHP will automatically
create an array of the checkbox values which can be subsequently accessed
via $_POST['system'][n] - be warned however that the '[]' can screw up any
JavaScript code that refers to the checkbox object...

HTH
Rich
-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: 19 November 2002 08:53
To: 'Ryan Jameson (USA)'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] HTML Forms question...


OK.  If I am using the POST method and the checkbox 'name' for all
of the checkboxes is 'system', how do I access the results?  I am
researching on the PHP site trying to figure out what this array is, and how
I access this if the index name is the same for all elements.  I am hoping
that this data will be in an array and I can simply loop through the
contents of the array.  If this data is stored in a hash (Perl word for this
type of array, not sure if it's the same in PHP), how do I access this data
since the index for every element would be the same?
I am SURE that I am probably missing some important conceptual
issues here, but still learning as I go.  Unfortunately, this probably means
that I will be completely rewriting this application at least once in the
future.  Oh well, live and learn.  Thanks again for the help.


-- 
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] HTML Forms question...

2002-11-19 Thread Ryan Jameson (USA)


if this is checked the value "scoobydoo" will be put into the array with index 
"checkbox1" which array is dependant on which method your form uses. :-) If it is not 
checked then there is no entry. in PHP with register_globals on the variable 
$checkbox1 will equal "scoobydoo" and not be set if the box is not checked.

hope this helps...

<>< Ryan

-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 9:28 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] HTML Forms question...


I know that this is not the forum for this question, I am only
looking for a pointer in the right direction here.  I need to gain a better
understanding of HTML forms, specifically checkboxes.  What I am looking for
is once I present a list of checkboxes and the user makes his selections,
how is this presented to the subsequent pages?  Does anyone know of a
website that has a tutorial or good explanation of how this works?  Thanks
in advance.

Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.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] IIS question

2002-10-31 Thread Ryan Jameson (USA)
Mystery solved:

http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q309508&;

IIS Lockdown did it... to fix go to windir\System32\Inetsrv\Urlscan\urlscan.ini and 
remove the .dat line or other necessary extension.

-Original Message-
From: Ryan Jameson (USA) 
Sent: Thursday, October 31, 2002 10:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] IIS question




You guys are so smart! Can anyone tell me why IIS gives a 404 error on any file with a 
.dat extension? Thanks..



<>< Ryan

-- 
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] IIS question

2002-10-31 Thread Ryan Jameson (USA)


You guys are so smart! Can anyone tell me why IIS gives a 404 error on any file with a 
.dat extension? Thanks..



<>< Ryan

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




RE: [PHP-DB] Newbie-Question: What's that @?

2002-10-30 Thread Ryan Jameson (USA)
Well the only difference I see is the ? ... hehe... but if you are refering to the @ 
symbol then you are correct ... ignore errors... :-)

<>< Ryan

-Original Message-
From: Marcus Fleige [mailto:marcus.fleige@;gmx.de]
Sent: Wednesday, October 30, 2002 5:05 PM
To: PHP-Mailinglist
Subject: [PHP-DB] Newbie-Question: What's that @?


hi there,

i've got a general question about php-scripts:

whats the difference between

@mysql_query($query)

and

@mysql_query($query)?

is it the same as in batch programming?
like, ignore all return messages?

thanks and greetings from germany,

marcus

--
^v^
[EMAIL PROTECTED]



-- 
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] Column Defualts

2002-10-29 Thread Ryan Jameson (USA)
Also note that many databases calculate the maximum allowable rowsize and allocate 
that much space whether it's populated or not. This is especially evident when you use 
char types verses varchar types. It's actually a good thing in most cases that they 
do, since it allows query algorithms to be more efficient when jumping to the next row 
is always the same distance and forces records to be stored sequentially. I'd trade 
disk space for performance any day...

<>< Ryan

-Original Message-----
From: Ryan Jameson (USA) 
Sent: Tuesday, October 29, 2002 10:30 AM
To: php-db
Subject: RE: [PHP-DB] Column Defualts


No, I believe all databases have an isnull bit flag to go with any column stored. So 
whether you set it or not the bit is being used.

<>< Ryan

-Original Message-
From: Gerard Samuel [mailto:gsam@;trini0.org]
Sent: Tuesday, October 29, 2002 9:47 AM
To: php-db
Subject: [PHP-DB] Column Defualts


Is defaulting a column to NULL considered as a waste of space??
I have a table that has 2 columns (so far) that defualt to NULL, and 
potentially,
there can be good amount of rows with NULL.  Just wondering...

-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/



-- 
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] Column Defualts

2002-10-29 Thread Ryan Jameson (USA)
No, I believe all databases have an isnull bit flag to go with any column stored. So 
whether you set it or not the bit is being used.

<>< Ryan

-Original Message-
From: Gerard Samuel [mailto:gsam@;trini0.org]
Sent: Tuesday, October 29, 2002 9:47 AM
To: php-db
Subject: [PHP-DB] Column Defualts


Is defaulting a column to NULL considered as a waste of space??
I have a table that has 2 columns (so far) that defualt to NULL, and 
potentially,
there can be good amount of rows with NULL.  Just wondering...

-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/



-- 
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] Credit Card Info & Cryptography

2002-10-23 Thread Ryan Jameson (USA)

:-) You have a good point, I just assumed that decision had already been made. Here's 
:a visual representation of my point.

To hide A by turning it into B using algorithm object C and only someone with key D 
can see it.

C.encrypt(A,D) = B;
C.decrypt(B,D) = A;

If anyone has either part of C, or D you can consider your data compromised. However, 
a reasonably complex C and D will result in a B that will not be useful alone. 

In the case of PGP the encrypt and decrypt algorithms are public, either of which are 
a good start to breaking the encryption. Hence the considerable increase in complexity 
of their problem & the need for a more complex solution.

Every encryption method by nature boils down to obscurity. What cannot be kept private 
must be complex enough to provide sufficient security. Hence the name P(retty) G(ood) 
P(rivacy) ... Which is better, 128 bit encryption or 40? If you answered 128 you are 
correct, only because it introduces more complexity than the other.

Trivia Question: Why WAS it illegal to export strong encryption technology?
Answer: Export laws? Technically, but specifically the government wanted the ability 
to decrypt exported data in a timely fashion. 

You can believe it... or not.


I LOVE PHP!!!

<>< Ryan


-Original Message-
From: 1LT John W. Holmes [mailto:holmes072000@;charter.net]
Sent: Wednesday, October 23, 2002 2:33 PM
To: Ryan Jameson (USA); [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Credit Card Info & Cryptography


When ever I see "easy", "encrypt", and "credit card" in the same sentence,
it makes me worry.

Don't store credit card numbers. Charge them once and don't save it
anywhere.

---John Holmes...

- Original Message -
From: "Ryan Jameson (USA)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 23, 2002 4:20 PM
Subject: RE: [PHP-DB] Credit Card Info & Cryptography


Since your goal is to encrypt the card number in the database you'll
naturally need a way to decrypt it as well. At that point it seems your
concern is that your database will be compromised. That can be avoided
easily by creating a single private key and using your own algorithm to
encrypt based on that key. The only catch is, if the code that does the
encrypting is compromised, and the database is compromised, then the numbers
are compromised. My basic point is, your need is not the same as what PGP
addresses in that PGP addresses the more difficult problem of passing data
between 2 entities. Your requirement is very simple to address; 1. write a
simple compiled module with an embedded key, 2. keep that key in a safe
place, and 3. write another module to decrypt, all it needs is the key. This
is similar to what was done with DVDs, just don't allow your encryption
algorithms to be compromised. You can put the source code in the same place
as your key, you can use a code scrambler when you compile, and you should
already have your server secure already. Again, my point is, this is easy
because the same entity that encrypts is doing the decrypt. Hope this helps.

<>< Ryan

-Original Message-
From: Doaldo Navai Junior [mailto:doaldo@;triunfo-bsb.com.br]
Sent: Wednesday, October 23, 2002 12:53 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] Credit Card Info & Cryptography


Suppose I sell some products online and get user's credit card info via SSL
connection. Isn't there any method (free, preferably) of ASSYMETRIC  (Public
key) cryptography I can use with PHP to store this data in a db?? Or is
there any other good option instead of this?

TIA,
Doaldo



--
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] Credit Card Info & Cryptography

2002-10-23 Thread Ryan Jameson (USA)
Since your goal is to encrypt the card number in the database you'll naturally need a 
way to decrypt it as well. At that point it seems your concern is that your database 
will be compromised. That can be avoided easily by creating a single private key and 
using your own algorithm to encrypt based on that key. The only catch is, if the code 
that does the encrypting is compromised, and the database is compromised, then the 
numbers are compromised. My basic point is, your need is not the same as what PGP 
addresses in that PGP addresses the more difficult problem of passing data between 2 
entities. Your requirement is very simple to address; 1. write a simple compiled 
module with an embedded key, 2. keep that key in a safe place, and 3. write another 
module to decrypt, all it needs is the key. This is similar to what was done with 
DVDs, just don't allow your encryption algorithms to be compromised. You can put the 
source code in the same place as your key, you can use a code scrambler when you 
compile, and you should already have your server secure already. Again, my point is, 
this is easy because the same entity that encrypts is doing the decrypt. Hope this 
helps.

<>< Ryan

-Original Message-
From: Doaldo Navai Junior [mailto:doaldo@;triunfo-bsb.com.br]
Sent: Wednesday, October 23, 2002 12:53 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] Credit Card Info & Cryptography


Suppose I sell some products online and get user's credit card info via SSL
connection. Isn't there any method (free, preferably) of ASSYMETRIC  (Public
key) cryptography I can use with PHP to store this data in a db?? Or is
there any other good option instead of this?

TIA,
Doaldo



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




  1   2   >