[PHP-DB] What Does God Look For In Our Heart?

2014-04-26 Thread Ken MD
What Does God look for in our heart?

 

How does God give everyone from the beginning of time an equal opportunity to be
saved?

The scriptures teach us God wants everyone to be saved ( 1 Tim 2:4
http://biblehub.com/context/1_timothy/2-3.htm ), and that he is Just (
Deuteronomy 32:4
http://biblehub.com/deuteronomy/32-4.htm ); and shows no favoritism ( Romans
2:11
http://biblehub.com/romans/2-11.htm ).

Because God is Just and shows no favoritism He does not give anyone an advantage
over another when it comes to salvation.  Those born in a Godly home have no
more of an advantage to be saved than someone born in a remote part of the world
who has never heard the gospel.  Those born after Jesus death have no more of an
advantage to be saved than someone born before his death.

How does God give everyone an equal opportunity to be saved?  The answer lies in
the innermost part of our being ( Psalm 51:6
http://biblehub.com/nasb/psalms/51-6.htm )!

God enlightens everyone that comes into the world ( John 1:9
http://biblehub.com/john/1-9.htm ), He draws us to him first because we are
not able to come to him on our own ( John 6:44
http://biblehub.com/john/6-44.htm ).  If we accept his invitation he leads us
to salvation ( John 16:13
http://biblehub.com/john/16-13.htm
http://biblehub.com/nasb/mark/4-20.htm )!

What does God look for in our heart?

A wonderful example may be found with one of the two criminals who died with
Jesus on the cross. One criminal was invited to Paradise ( Luke 23:43
http://biblehub.com/luke/23-43.htm ) the other was not.  Why such different
outcomes?

Both criminals hurled abuse towards Jesus ( Mark 15:32
http://biblehub.com/mark/15-32.htm ), but one of them began to acknowledge him
as the Christ, pleading with Jesus to save himself and him!  Jesus saw the
motive of his heart and did not respond.

The other criminal who also hurled abuse towards Jesus began to reveal a
different motive so Jesus invited him to Paradise!

Let’s take a closer look at what God uncovered in the heart of these two
criminals.  Their heart is revealed in eight statements; two by the criminal who
did not receive an invitation to Paradise and six by the criminal who was
invited ( Luke 23:39-43
http://biblehub.com/context/luke/23-38.htm ). 

We should note the scriptures are clear man’s heart is deceitful and
desperately wicked ( Jeremiah 17:9
http://biblehub.com/jeremiah/17-9.htm ) but it gives room for desire ( Acts
13:22
http://biblehub.com/acts/13-22.htm , Luke 18:13
http://biblehub.com/luke/18-13.htm , Joshua 24:15
http://biblehub.com/joshua/24-15.htm , Matt 13:15
http://biblehub.com/matthew/13-15.htm ).

Statement #1 “Are you not the Christ”?  (Uninvited Criminal)
His reference to Jesus as the Christ is more of a political statement in an
effort to solicit a favor rather than be in awe of who Jesus is.

 Statement #2 “Save yourself and us”.  (Uninvited Criminal)
His earthly life is his primary interest and he doesn’t see the need for Jesus
to die.

Statement #1 “Do you not even fear God”? (Invited criminal)
He begins with the fear of God!  How apropos considering the “Fear of God”
is the beginning of wisdom ( Psalms 111:10
http://biblehub.com/psalms/111-10.htm ).

Statement #2 “Since you are under the same sentence of condemnation”?
(Invited criminal)
He was ashamed when compared to Jesus who was equally being condemned.

Statement #3 “and we indeed are suffering justly” (Invited criminal)
He acknowledged the consequences for his actions.

Statement #4 “for we are receiving what we deserve for our deeds” (Invited
criminal)
He took ownership of what he had done wrong (I am a sinner).

Statement #5 “but this man has done nothing wrong”! (Invited criminal)
He confesses Jesus was innocent ( John 1:29
http://biblehub.com/john/1-29.htm )! Symbolizing the Lamb of God.

Statement #6 “Jesus, remember me when you come into your kingdom”! (Invited
criminal)
God’s kingdom is where his will is ( Matt 6:10
http://biblehub.com/matthew/6-10.htm ).  He wanted God’s will over his own!

Notice the similarity of Adam’s heart with the criminal invited to Paradise…

Adam feared God: “I was afraid”( Gen 3:10
http://biblehub.com/genesis/3-10.htm )!

Adam was ashamed: “I was naked”( Gen 3:10
http://biblehub.com/genesis/3-10.htm )!

Adam was aware of consequences: “I hid myself”( Gen 3:10
http://biblehub.com/genesis/3-10.htm ).

Adam took ownership of doing wrong: “I ate”( Gen 3:12
http://biblehub.com/genesis/3-12.htm ).

Adam was clothed by God with the skin of an animal (death). Symbolizing the Lamb
of God ( Gen 3:21
http://biblehub.com/genesis/3-21.htm ).

Adam was forced from the Garden ( Gen 3:24
http://biblehub.com/genesis/3-24.htm ) indicating his desire to stay in the
garden where God’s will is.

The eternal destiny of both criminals were determined by what God revealed in
their heart.  Salvation for the criminal invited to Paradise was not dependent
upon him do anything except having a desire for God!  His desire encompassed 

[PHP-DB] Multiple result sets with a prepared statement in mysqli

2012-04-06 Thread Ken Keefe
I am trying to use mysqli's prepared statements to execute a stored 
procedure that returns multiple result sets. I've been struggling with 
this for some time now. I have created a short example test script that 
demonstrates the problem. The script can be found here:


http://pastebin.com/YZtDCNMF

This code is how I expect mysqli to handle this scenario. However, I get 
a warning on line 31 that the number of bind variables doesn't match the 
number of fields in the prepared statement. This means that the second 
result was not fetched by the call on line 29.


Any help on this issue would be greatly appreciated! Also, I'm using the 
packaged version of PHP that comes on Ubuntu 10.04 (5.3.2).


Thanks,
Ken

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



Re: [PHP-DB] Re: filter search

2011-04-20 Thread Ken Kixmoeller
On Tue, Apr 19, 2011 at 7:41 PM, Jim Giner
jim.gi...@albanyhandball.com wrote:O
 No follow-up?  I must have made complete sense!!  :)

Either that or (based on the initial post) he had *no* idea what you
were talking about.

Ken

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



Fwd: [PHP-DB] Books

2010-10-18 Thread Ken Kixmoeller
This question is asked all the time -- the trouble is that the answer
is too personal to be of any use to you.

People's recommendations will change based on:
 -- experience (no programming vs. some vs. a lot),
 -- history (programmed in X, not in Y and vice-versa)
 -- age (young farts vs. we wise sages)
 -- educational background (technical vs. not and more)

What I used to tell me students (when there were only books) was this:
go to the book store:

 -- pick up a book that is coded to your self-assesses skill: beginner, etc.
 -- Look at the Table of Contents: does the language meld with yours?
 -- Go to the index: Try to look up something you are wondering about,
or a problem you have.
 If you can find pertinent information -- buy it

Try another one...

Ken

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



Re: [PHP-DB] Is this syntax is correct?

2010-09-06 Thread Ken Kixmoeller

Amit Tandon wrote:

SELECT d.username,  r.password FROM data join  registration r on r.username



SELECT username FROM data, password FROM registration WHERE username=%s AND
password=%s


Oh, boy -- r on r?? Obviously the guy is a rookie.
Let's be simple:

SELECT data.username,registration.password
 FROM data inner join registration
  ON data.linking_field = registration.linking_field
 WHERE username=%s
  AND password=%s

linking_field is the name of the common field in each table, such as 
user_id.


Comments:

1. data is a really bad name for a table. You will confuse the heck 
out of yourself and others who follow you. Change it.


2. As Amit kind of said, no password should be stored in a table 
(available on a web server) without encrypting the password information.


Ken

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



Re: [PHP-DB] MySQLDump through PHP/HTML UI

2008-12-10 Thread Ken Kixmoeller.com

Merci, Yves - --

It takes the blink of an eye. It seems like none of the string is  
running at all.


Also, yeah, the slashes thing used to trip me up, too, when I first  
started working around Linux boxes. However, the file *is* being  
created and it is in the right place, just nothing in it.


Ken

On Dec 10, 2008, at 9:43 AM, Yves Sucaet wrote:


Hi Ken,

How long does the mysqldump operation last? Maybe it's a script  
timeout problem? And maybe you have different settings on both  
machines?


Other idea: what about pathnames? Linux uses / to separate paths,  
Windows uses \.


That's all I have for now,

Yves


- Original Message - From: phphelp -- kbk  
[EMAIL PROTECTED]

To: php-db@lists.php.net
Sent: Wednesday, December 10, 2008 9:32 AM
Subject: [PHP-DB] MySQLDump through PHP/HTML UI



Hello - - -- -

I have a utility which creates a MySQLDump of selected tables or  
the whole database.  This works fine on my development machine, a  
W2K  box. It does not work on the testing server, a linux box.


I'll post code if you want, but it is very simple:

1. I create the dump language, including the file into which  
the  data is dumped into a variable.


2. I perform system($dump_language). I also tried it exec  
($dump_language). Both produce the same result:


The file is created (the directory is one for which the  
application  has r/w rights). In Windoze, the file is complete and  
perfect. On the  Linux box, only the header information of the  
dump file is written,  nothing about any database or table.


Any ideas?

Thank you,

Ken

--
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] MySQLDump through PHP/HTML UI

2008-12-10 Thread Ken Kixmoeller.com


On Dec 10, 2008, at 3:21 PM, Yves Sucaet wrote:


What PHP-function/command are you using to invoke the mysqldump  
command?




As I said in the original post, I have used both system() and exec(),  
both with the same result.






Try including a flush() statement right before you start dumping.



I'll try it, thanks.

Ken


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



Re: [PHP-DB] Recommended web developers

2008-06-24 Thread Ken Keefe
I'm a little surprised no one else has commented on this, but for a
website that complicated, 10k is way too low. I've done work on
websites that do almost all of those things separately, but not
combined and I can tell you to have a high quality website that does
just one of the things you mention will cost you about 10k. This is
very much a guess because something like Blogging can be done very
simply (cheaply). But it will not have even close to the feature set
of the major blogging sites.

In fact, I just wrapped up a project that was a simple business
directory last month for 5k. Again, that site was *simple* and no
where near as flexible as the code you see from yahoo or google. There
is a reason those companies pay hundreds of developers 80k a year...

Sorry to rain on your parade. Hopefully you just left out a 0 or two...

Ken

On Tue, Jun 24, 2008 at 10:00 AM, A. Joseph [EMAIL PROTECTED] wrote:
 Which company in India or USA can you recommend to design a complex
 website for my company.

 The site will be a social site, will include, Blog, Articles, Shops,
 Music, Movie, Directory, Pre-paid card system, Culture and Tourism,
 downloads, file upload and sharing
 The site is just like yahoo, but no email service.

 Advert method will be like Google Ads
 PHP 5 MySql, Smarty, SOAP Service, Ajax, Javascript, div based, Apache
 with mod_rewrite

 Admin Area, Users area, front end
 Full detail will be available
 Planned amount is  $1 Max

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





-- 

Naturally, the common people don't want war, but they can always be
brought to the bidding of the leaders. Tell them they are being
attacked, and denounce the pacifists for lack of patriotism and
endangering the country. It works the same in every country.

--- Herman Goering, Hitler's Reichsmarschall, At the Nuremberg Trials

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



Re: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Ken Keefe
Alice, make sure the php-mssql package is installed.

# yum install php-mssql

You shouldn't have to compile php or freetds as there are packages
available to do what you want...

Ken

On Thu, Jun 12, 2008 at 11:14 AM, Wei, Alice J. [EMAIL PROTECTED] wrote:
 Hi,

  I am currently using a Linux box with Fedora 9.0 and I am trying to connect 
 PHP to a MS SQL database. All the permissions on the MS SQL database is up to 
 date and accurate, but I consistently get errors that say

 PHP Fatal error:  Call to undefined function mssql_connect() in 
 /usr/local/apache/htdocs/create_new_entry_master.php on line 20

 I have looked into the options of using FreeBSD, as suggested on the 
 http://us3.php.net/manual/en/function.mssql-connect.php#83196,  but I am not 
 sure if I could use it since I don't use a Windows Machine to run my PHP.
 Does anyone have any suggestions?

 Alice
 ==
 Alice Wei
 MIS 2009
 School of Library and Information Science
 Indiana University Bloomington
 [EMAIL PROTECTED]

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





-- 

Naturally, the common people don't want war, but they can always be
brought to the bidding of the leaders. Tell them they are being
attacked, and denounce the pacifists for lack of patriotism and
endangering the country. It works the same in every country.

--- Herman Goering, Hitler's Reichsmarschall, At the Nuremberg Trials

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



Re: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Ken Keefe
Make sure some where in your php.ini you have a line that looks like
this and is not commented out:

extension=mssql.so

I haven't used a fedora box as a php webserver in over a year, so my
memory of their config file layout is pretty rusty. However, I'm
pretty sure they consolidate everything into a single .ini file. I
always add a phpinfo.php file to my project so I can run it and see
which .ini file apache is using to configure php. All you have to put
in the phpinfo.php file is this line:

?php phpinfo(); ?

If you visit that page and look around, it will tell you where the
php.ini file is. Also, once you have mssql enabled, there will be a
section in the phpinfo.php page with all the mssql options. So,
looking at the phpinfo.php file is another good way to tell if you
have mssql installed properly.

Good luck!

Ken

On Thu, Jun 12, 2008 at 12:58 PM, Wei, Alice J. [EMAIL PROTECTED] wrote:
 
 From: Ken Keefe [EMAIL PROTECTED]
 Sent: Thursday, June 12, 2008 1:44 PM
 To: Wei, Alice J.
 Cc: php-db@lists.php.net
 Subject: Re: [PHP-DB] PHP to MS SQL Package

 Alice, make sure the php-mssql package is installed.

 # yum install php-mssql

 You shouldn't have to compile php or freetds as there are packages
 available to do what you want...


 I have just installed this gadget as you have listed, and then I have . The 
 problem is that this does not get rid of what I had in my errors previously.

  PHP Fatal error:  Call to undefined function mssql_connect() in 
 /usr/local/apache/htdocs/create_new_entry_master.php on line 20

 Code snippet:
 // connection to the database
 $dbhandle= mssql_connect($myServer, $myUser, $myPass)
or die(Couldn't connect to SQL Server on $myServer);

 Ken

 On Thu, Jun 12, 2008 at 11:14 AM, Wei, Alice J. [EMAIL PROTECTED] wrote:
 Hi,

  I am currently using a Linux box with Fedora 9.0 and I am trying to connect 
 PHP to a MS SQL database. All the permissions on the MS SQL database is up 
 to date and accurate, but I consistently get errors that say

 PHP Fatal error:  Call to undefined function mssql_connect() in 
 /usr/local/apache/htdocs/create_new_entry_master.php on line 20

 I have looked into the options of using FreeBSD, as suggested on the 
 http://us3.php.net/manual/en/function.mssql-connect.php#83196,  but I am not 
 sure if I could use it since I don't use a Windows Machine to run my PHP.
 Does anyone have any suggestions?

 Alice
 ==
 Alice Wei
 MIS 2009
 School of Library and Information Science
 Indiana University Bloomington
 [EMAIL PROTECTED]

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





 --

 Naturally, the common people don't want war, but they can always be
 brought to the bidding of the leaders. Tell them they are being
 attacked, and denounce the pacifists for lack of patriotism and
 endangering the country. It works the same in every country.

 --- Herman Goering, Hitler's Reichsmarschall, At the Nuremberg Trials




-- 

Naturally, the common people don't want war, but they can always be
brought to the bidding of the leaders. Tell them they are being
attacked, and denounce the pacifists for lack of patriotism and
endangering the country. It works the same in every country.

--- Herman Goering, Hitler's Reichsmarschall, At the Nuremberg Trials

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



Re: [PHP-DB] PHP to MS SQL Package

2008-06-12 Thread Ken Keefe
That error message tells you that you are getting closer. Next step
would be to make sure you have a connection to that system:

$ ping 192.168.10.128

Next thing I would do is see if that port is open on the server:

$ telnet 192.168.10.128 1433

If it says something about Escape character is ... then the SQL
server is listening and no firewalls or anything are getting in the
way.

Finally, you probably need to add an entry at the bottom of your
/etc/freetds/freetds.conf file that looks like this:

[SomeNameForTheServer]
host = 192.168.10.128
port = 1433
tds version = 8.0

Then, in your php code, use the name you give (SomeNameForTheServer)
as the host instead of the IP address.

Good luck.

Ken

On Thu, Jun 12, 2008 at 3:53 PM, Wei, Alice J. [EMAIL PROTECTED] wrote:
 Hi,

  I hope this would allow me to address this problem to a step further now.
  After getting FreeTDS installed, my error has now moved away from the 
 undefined function level.
  I have looked through the PHP help from 
 http://us3.php.net/manual/en/function.mssql-connect.php, and configured 
 according to what has been listed in the user commentsThis is my error now:

   PHP Warning:  mssql_connect(): Unable to connect to server:  192.168.10.128 
 in /usr/local/apache/htdocs/test.php on line 22

   As some of you suggested, I find it surprising that after installing 
 FreeTDS and referencing it when I was installing it using 
 --with-sybase=/usr/local/freetds option when I installed the PHP, it kept on 
 bringing me back errors saying that it cannot find it. I am not sure if it is 
 the cause of why I still cannot connect. As for my php.info, I tried to run 
 the search to find mssql values, but I cannot find any.

   Is this the reason why I still cannot connect to a different machine to its 
 MS SQL using PHP? Have I missed something in my setup or something?
   Note: The setup for the database is accessible by another computer using 
 the same server passwords, etc.

 I welcome any suggestions on t his.

 Alice
 ==
 Alice Wei
 MIS 2009
 School of Library and Information Science
 Indiana University Bloomington
 [EMAIL PROTECTED]
 
 From: Olavi ivask [EMAIL PROTECTED]
 Sent: Thursday, June 12, 2008 2:20 PM
 To: Wei, Alice J.
 Cc: php-db@lists.php.net
 Subject: RE: [PHP-DB] PHP to MS SQL Package

 Hello,

 Here is a good article about ms-sql  PHP on Linux
 (http://www.devarticles.com/index2.php?option=contenttask=viewid=667pop=1page=0hide_js=1)


 Olavi Ivask
 On Thu, 2008-06-12 at 13:43 -0400, Wei, Alice J. wrote:
 Hi,

   After stopping the Apache server, I reinstalled PHP by adding the line you 
 had below, and then restarted Apache.

 ./configure
 --with-apxs2=/usr/local/apache/bin/apxs  \
 --with-sybase=/usr/local/freetds
 --prefix=/usr/local/apache/php \
 make
 make install

   After this has been completed, I am still getting the same error about how 
 the function is not defined.

 Fatal error:  Call to undefined function mssql_connect() in 
 /usr/local/apache/htdocs/create_new_entry_master.php on line 20

 Could there be other options? Or, am I missing something here?

 Alice
 ==
 Alice Wei
 MIS 2009
 School of Library and Information Science
 Indiana University Bloomington
 [EMAIL PROTECTED]
 
 From: Olavi ivask [EMAIL PROTECTED]
 Sent: Thursday, June 12, 2008 12:57 PM
 To: Wei, Alice J.
 Cc: php-db@lists.php.net
 Subject: Re: [PHP-DB] PHP to MS SQL Package

 Hi,

 you need to install freetds before compiling php.

 compile php:

 ./configure [--with-apxs --with-mysql...]
 --with-sybase=/usr/local/freetds
 make
 make install

 Olavi Ivask

 On Thu, 2008-06-12 at 12:14 -0400, Wei, Alice J. wrote:
  Hi,
 
I am currently using a Linux box with Fedora 9.0 and I am trying to 
  connect PHP to a MS SQL database. All the permissions on the MS SQL 
  database is up to date and accurate, but I consistently get errors that say
 
  PHP Fatal error:  Call to undefined function mssql_connect() in 
  /usr/local/apache/htdocs/create_new_entry_master.php on line 20
 
  I have looked into the options of using FreeBSD, as suggested on the 
  http://us3.php.net/manual/en/function.mssql-connect.php#83196,  but I am 
  not sure if I could use it since I don't use a Windows Machine to run my 
  PHP.
  Does anyone have any suggestions?
 
  Alice
  ==
  Alice Wei
  MIS 2009
  School of Library and Information Science
  Indiana University Bloomington
  [EMAIL PROTECTED]
 




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





-- 

Naturally, the common people don't want war, but they can always be
brought to the bidding of the leaders. Tell them they are being
attacked, and denounce the pacifists for lack of patriotism

Re: [PHP-DB] Question on PHP connect MS SQL 2005

2008-06-11 Thread Ken Keefe
I know the package you need is called php-sybase in ubuntu. It's
probably something similar in Fedora. Know that this package will only
let you do a subset of the mssql function calls. If you are just
connecting and doing a normal query, it will suffice. If you need to
do prepared statements for stored procedures, you will likely have to
compile a php-mssql package manually. I just did this last night on my
ubuntu server to get some stored procedures working. Hope that helps.

Ken

On Wed, Jun 11, 2008 at 8:52 AM, Wei, Alice J. [EMAIL PROTECTED] wrote:
 Hi,

  This may sound really stupid, but I installed Fedora and checked on the box 
 for web development to allow PHP and other web scripts on the platform. 
 Therefore, I could run PHP scripts fine, and the mentioning of this file, 
 would you be able to offer me suggestions on where it might be?

 Thanks for your help.

 Alice
 ==
 Alice Wei
 MIS 2009
 School of Library and Information Science
 Indiana University Bloomington
 [EMAIL PROTECTED]

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





-- 

Naturally, the common people don't want war, but they can always be
brought to the bidding of the leaders. Tell them they are being
attacked, and denounce the pacifists for lack of patriotism and
endangering the country. It works the same in every country.

--- Herman Goering, Hitler's Reichsmarschall, At the Nuremberg Trials

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



Re: [PHP-DB] Alternative for MySQL Admin tools

2008-05-01 Thread Ken Keefe
Unfortunately it is windows only (written with .NET). When I was stuck
on a windows box, it was a very nice tool. I'd use it now if it
existed on other platforms...

Ken


On Thu, May 1, 2008 at 9:30 AM, Yves Sucaet [EMAIL PROTECTED] wrote:
 Just like to point out http://www.sqlyog.com, an alternative stand-alone 
 desktop tool to manage you MySQL servers. The free community edition is very 
 good! I've been using it for 3 years now and never had to need to install 
 anything else or additional.

  HTH,

  Yves


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



Re: [PHP-DB] Why $row is EMPTY

2008-04-29 Thread Ken Keefe
Try doing print_r($row); in your while loop and see what exactly is in
that array.

Ken

On Tue, Apr 29, 2008 at 1:46 PM, Jon L. [EMAIL PROTECTED] wrote:
 I could be wrong, but I don't think table aliases continue to exist in PHP;
  only the column names.

   $g_name = $row[gigName];
   $vname = $row[venueName];
   $genre = $row[name];


  You may also consider revising the query to only grab the columns you need,
  using an alias for at least genre.name.

  $query = 'SELECT gig.gigName AS gig, venue.venueName AS venue, genre.name AS
  genre FROM `gig` LEFT JOIN genre ON gig.genreId=genre.genreId LEFT JOIN

 venue ON gig.venueID = venue.vid where gig.gigid = '.$gigDetail.' ORDER BY
  gig.gigid';

  $result = mysql_query($query) or die(mysql_error());
  while ($row = mysql_fetch_array($result))
  {
   echo Program is in While loop;
   $g_name = $row[gig];
   $vname = $row[venue];
   $genre = $row[genre];

   echo(Gig Name: .$g_name);
  }


  - Jon L.


  On Tue, Apr 29, 2008 at 1:27 PM, Nasreen Laghari [EMAIL PROTECTED]
  wrote:



   Hi,
   Why my program is not going in while loop? When I run the same query in
   SQL cmd, it brings result but here when I print $result gives Resouce ID
   number means $result has data then why $row is empty.
   $query = 'SELECT * FROM `gig` LEFT JOIN genre ON gig.genreId=genre.genreId
   LEFT JOIN venue ON gig.venueID = venue.vid where gig.gigid = '.$gigDetail.'
   ORDER BY gig.gigid';
  
$result = mysql_query($query) or die(mysql_error());
   while ($row = mysql_fetch_array($result))
 {
 echo Program is in While loop;
 $g_name = $row[gig.gigName];
 $vname = $row[venue.venueName];
 $genre = $row[genre.name];
 echo(Gig Name: .$g_name);
   }
   Regards
   Nasreen
  
  
  

 
   Be a better friend, newshound, and
   know-it-all with Yahoo! Mobile.  Try it now.
   http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
  


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



RE: [PHP-DB] mysql data truncation does not cause an error to be thrown

2007-11-08 Thread Vandegrift, Ken
You may want to check the my.ini setting for the table type you are
using and see if there is a setting in there that needs to be enabled.  

I thought I read once that truncation may happen silently depending on
the my.ini setting.

Just a thought.

Ken Vandegrift
Shari's Management Corporation
Web Developer/Administrator
(Direct) 503-605-4132
[EMAIL PROTECTED]
-Original Message-
From: Andrew Blake [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 7:51 AM
To: Instruct ICC
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] mysql data truncation does not cause an error to
be thrown

Hiya
I could check the length of the field against the entry data and 
javascript myself out of trouble but i was more worried that there is no

error or message when mysql clearly returns one saying i've truncated 
this yet php ignores it completely. It should fail or know about the 
truncation at least !
Cheers for your reply though :-)

Andy

Instruct ICC wrote:
 Using mysql_query if i try to force more data than a field can have
the 
 data is truncated yet no error is throw at all.
 Is there a way round this ?
 Cheers

 Andy
 

 This isn't exactly what you want to hear, but how about validating
your input before submitting a query?

 _
 Boo! Scare away worms, viruses and so much more! Try Windows Live
OneCare!

http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotm
ailnews
   

-- 
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] Multiple prepared statements and preparing a stored procedure...

2007-06-05 Thread Ken Keefe

Is it possible to have multiple prepared statements associated with a
single mysqli object at one time?

For example:

$db = new mysqli($sqlServer, $sqlUser, $sqlPass, $sqlDB);
$query1 = $db-prepare($sql1);
$query2 = $db-prepare($sql2);
foreach ($arr as $key = $val)
   if($val)
   {
   $query1-bind_param(s, $key);
   $query1-execute();
   }
   else
   {
   $query2-bind_param(s, $key);
   $query2-execute();
   }
$query1-close();
$query2-close();


Also, is there any benefit to using a prepared statement to call a
stored procedure? If so, how do I prepare another statement after the
stored procedure? I keep getting an error about being out of sync...

Thanks,
Ken

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



RE: [PHP-DB] Sigleton DB connection tripping on its elf

2006-07-19 Thread Vandegrift, Ken
Well, I have a situation where an Order object holds a collection of
LineItem objects and of course they all use the same DB connection via a
singleton.

The Order object has a method that creates new LineItem objects from an
ORDER_DTL table.

Code snippet:

// SET ORDER ITEMS
$stmt = $this-db-prepare($detailSQL);
$stmt-execute(array(':orderid' = $orderID));
while ($row = $stmt-fetch(PDO::FETCH_ASSOC)) {
  $lineItem = new GCLineItem($row['item_id']);
  $lineItem-__set('quantity', $row['quantity']);
  $lineItem-__set('price', $row['price']);
  $this-items[] = $lineItem;
}

Within the while loop I am loading GCLineItem objects that themselves
try to create a statement object which is where the error is triggered
since both share the same DB connection and the statement objects trip
over themselves.

I get an SQL error HY090 Buffer error...

My only solution was to let the GCLineItem objects create another DB
connection for themselves.  This is not ideal and is a hack in my
opinion.

I could run a fetchAll on the Order statement object and this would
complete one statement object before each GCLineItem objects creates
there own statement object - correct?  I may have just answered my own
question, but if you or anybody else can think of a better solution - I
am all ears!


Ken Vandegrift
[EMAIL PROTECTED]
Web Administrator
Sharis Mgmt. Corp

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 18, 2006 5:32 PM
To: Vandegrift, Ken
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Sigleton DB connection tripping on itself

Vandegrift, Ken wrote:
 Good Day List,
  
 I have a singleton DB connection that I am trying to use throughout my

 application but It keeps tripping on itself.
  
 My main question is: If I am in the middle of a transaction can I 
 prepare multiple statements eand execute them or will this cause an 
 error?

There's no reason why it can't. However, if any of those queries fail
the whole transaction will get rolled back.

What errors are you getting?

--
Postgresql  php tutorials
http://www.designmagick.com/

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



[PHP-DB] Sigleton DB connection tripping on itself

2006-07-18 Thread Vandegrift, Ken
Good Day List,
 
I have a singleton DB connection that I am trying to use throughout my
application but It keeps tripping on itself.
 
My main question is: If I am in the middle of a transaction can I
prepare multiple statements eand execute them or will this cause an
error?
 
Here is a code example that tries to reset a users password:
$login = SOME_LOGIN;
 
$sql = SELECT  . USER_TABLE_ID .  FROM  . USER_TABLE .   .
 WHERE  . USER_TABLE_LOGIN .  = :login;;
 
  try {
   $this-db-beginTransaction();
   $stmt = $this-db-prepare($sql);
   $stmt-execute(array(':login' = $login));
   $rs   = $stmt-fetchAll(PDO::FETCH_ASSOC);
 
   // MAKE SURE THERE IS ONLY ONE USER WITH THIS LOGIN
   if (count($rs) != 1) {
$this-db-rollBack();
$stmt = null;
return false;
   }
   // ONLY ONE USER RETURNED - UPDATE PASSWORD
   if ($password = $this-generatePassword()) {
 
$sql = UPDATE  . USER_TABLE .   .
   SET  . USER_TABLE_PWD .  = ';
   if ($this-sha1) {
 $sql .= sha1($password);
}else {
 $sql .= $password;
}
$sql .= '  .
WHERE  . USER_TABLE_ID .  = :userid;;
 
$stmt = $this-db-prepare($sql);
$stmt-execute(array(':userid' = $rs[0][USER_TABLE_ID]));
$this-db-commit();
$stmt = null;
return $password;
   }
   // COULD NOT GENERATE NEW PASSWORD
   else {
$this-db-rollBack();
$stmt = null;
return false;
   }
  }catch (PDOException $e) {
   $this-db-rollBack();
   $stmt = null;
   return false;
  }
 
Ken Vandegrift
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
Web Administrator
Sharis Mgmt. Corp
 


RE: [PHP-DB] PDO and Exceptions

2006-06-22 Thread Vandegrift, Ken
Thanks.

That was my issue. I had to separate each insert instead of grouping
them together and executing the query.  Exception is now thrown if a
primary key violation occurs and entire transaction is rolled back.


Ken Vandegrift

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 5:39 PM
To: Vandegrift, Ken
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] PDO and Exceptions

Vandegrift, Ken wrote:
 Good Afternoon,
  
 I have an instance of a PDO object set to throw a PDOException on 
 errors.  However, it does not appear to do this when a primary key 
 violation error occurs on an insert sql statement.  An exception 
 should be thrown in this case correct?
  
 The insert statements are part of a transaction but I am unable to 
 rollback the transaction on error.
  
 Any ideas would be greatly appreciated.
  
 Code sample:
  
 /** Excerpt from DB connection class **/ $this-db = new 
 PDO('odbc:DBNAME', $userid, $pwd); 
 $this-db-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  
 /**
   * Updates order information in the database.
   * Called from Order::dbSaveOrder
   * @return boolean true on success
   * @access protected
   */
  protected function dbUpdateOrder() {
  
   // VARIABLES TO TRACK PROPER SQL FORMATTING
   $count = count($this-attributes);
   $i = 1;
  
   // BUILD ORDER TABLE UPDATE QUERY
   $sql = UPDATE  . ORDER_TABLE .  SET ;
   foreach ($this-attributes as $attribute = $value) {
$attribute = strtoupper($attribute);
$sql  .= (is_string($value) || is_null($value)) ? {$attribute}
=
 '{$value}' : {$attribute} = {$value};
if ($i  $count) {
 $i++;
 $sql .= , ;
}
   }
   $sql .=  WHERE  . ORDER_TABLE_ID .  = :orderid;;
  
   try {
$this-db-beginTransaction();
$stmt = $this-db-prepare($sql);
$stmt-execute(array(':orderid' = $this-attributes['order_id']));
  
 / ABOVE CODE WORKS WITHOUT ISSUE - THIS NEXT BLOCK DOES NOT 
 TRIGGER AN EXCEPTION ON DUPLICATE ENTRIES /
  
// SAVE GIFT CARD NUMBERS RECORDED FOR THIS ORDER
if (!empty($this-gcnums)) {
 $sql = null;
 foreach ($this-gcnums as $itemid = $gcnumbers) {
   foreach ($gcnumbers as $gcnum) {
 $sql .= INSERT INTO GIFTCARD_RECORD  .
 ( .
 ORDER_ID,  .
 ITEM_ID,  .
 GC_NUM  .
 )  .
 VALUES .
 ( .
 {$this-__get('order_id')},  .
 {$itemid},  .
 '{$gcnum}' .
 );;
   } // End Inner FOREACH
} // End Outer FOREACH
$stmt = $this-db-prepare($sql);
  $stmt-execute();
}
$this-db-commit();
$stmt = null;
return true;
   }catch (PDOException $e) {
$this-db-rollBack();
Log::write(LOG_DIR, 'order',
  \r Order::dbUpdateOrder \r .
  [UPDATE SQL] =  . $sql . \r .
  [DB ERROR] =  . $e-getMessage() . \r .
  **
);
$this-error = 'The system has encountered an error and is unable 
 to update this order. ' .
  'Please contact the system administrator.';
$stmt = null;
return false;
   }
  }
  
 Ken Vandegrift
  
 

I can't see a try in the second part. Wouldn't you need:

try {
   update query
   try {
 insert query
   } catch exception
} catch exception

?

I could be on the completely wrong track but I think you need a try /
catch for each part.
--
Postgresql  php tutorials
http://www.designmagick.com/

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



[PHP-DB] PDO and Exceptions

2006-06-21 Thread Vandegrift, Ken
Good Afternoon,
 
I have an instance of a PDO object set to throw a PDOException on
errors.  However, it does not appear to do this when a primary key
violation error occurs on an insert sql statement.  An exception should
be thrown in this case correct?
 
The insert statements are part of a transaction but I am unable to
rollback the transaction on error.
 
Any ideas would be greatly appreciated.
 
Code sample:
 
/** Excerpt from DB connection class **/
$this-db = new PDO('odbc:DBNAME', $userid, $pwd);
$this-db-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 
/**
  * Updates order information in the database.
  * Called from Order::dbSaveOrder
  * @return boolean true on success
  * @access protected
  */
 protected function dbUpdateOrder() {
 
  // VARIABLES TO TRACK PROPER SQL FORMATTING
  $count = count($this-attributes);
  $i = 1;
 
  // BUILD ORDER TABLE UPDATE QUERY
  $sql = UPDATE  . ORDER_TABLE .  SET ;
  foreach ($this-attributes as $attribute = $value) {
   $attribute = strtoupper($attribute);
   $sql  .= (is_string($value) || is_null($value)) ? {$attribute} =
'{$value}' : {$attribute} = {$value};
   if ($i  $count) {
$i++;
$sql .= , ;
   }
  }
  $sql .=  WHERE  . ORDER_TABLE_ID .  = :orderid;;
 
  try {
   $this-db-beginTransaction();
   $stmt = $this-db-prepare($sql);
   $stmt-execute(array(':orderid' = $this-attributes['order_id']));
 
/ ABOVE CODE WORKS WITHOUT ISSUE - THIS NEXT BLOCK DOES NOT TRIGGER
AN EXCEPTION ON DUPLICATE ENTRIES /
 
   // SAVE GIFT CARD NUMBERS RECORDED FOR THIS ORDER
   if (!empty($this-gcnums)) {
$sql = null;
foreach ($this-gcnums as $itemid = $gcnumbers) {
  foreach ($gcnumbers as $gcnum) {
$sql .= INSERT INTO GIFTCARD_RECORD  .
( .
ORDER_ID,  .
ITEM_ID,  .
GC_NUM  .
)  .
VALUES .
( .
{$this-__get('order_id')},  .
{$itemid},  .
'{$gcnum}' .
);;
  } // End Inner FOREACH
   } // End Outer FOREACH
   $stmt = $this-db-prepare($sql);
 $stmt-execute();
   }
   $this-db-commit();
   $stmt = null;
   return true;
  }catch (PDOException $e) {
   $this-db-rollBack();
   Log::write(LOG_DIR, 'order',
 \r Order::dbUpdateOrder \r .
 [UPDATE SQL] =  . $sql . \r .
 [DB ERROR] =  . $e-getMessage() . \r .
 **
   );
   $this-error = 'The system has encountered an error and is unable to
update this order. ' .
 'Please contact the system administrator.';
   $stmt = null;
   return false;
  }
 }
 
Ken Vandegrift
 


Re: [PHP-DB] redirecting function

2005-03-14 Thread Ken
you forgot the quotation marks on header i believe

header('location: www.foobar.com');

and also make sure your browser supports header redirects, not all browsers do.


On Mon, 14 Mar 2005 01:43:09 -0800 (PST), Yemi Obembe
[EMAIL PROTECTED] wrote:
 hi folks,
 who knows any function that can do this javascript trick
 script
 window.location='http://somewhere.com/'
 /script
 tried header(location:http://somewhere.com/) but it gave me an 
 errorinclude() on the other hand only includes the url  doest redirect 
 to it...
 thnx
 
 -
 
 A passion till tomorrow,
 Opeyemi Obembe | ng.clawz.com
 
 
 -
 Do you Yahoo!?
  Make Yahoo! your home page


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



[PHP-DB] Missing Data in Columns

2003-12-10 Thread Ken Colburn
Only six of ten columns in a php table show up on the web.  I've been 
using a standard format for many months now and the only difference here 
is that I'm drawing on more (seven) tables.  Even more curious, running 
the select and where statements in mysql produces the full table. 
Also, clicking on Sort in a blank Vote column rearranges the visible 
vote columns which suggests sorting based on the invisible column.  Worse 
(which I won't try to solve here), when I delete some select statements 
the table disappears.

The link and select statement are shown below (I won't copy the 
extensive where statement, but the table didn't appear when that was 
wrong).

Any ideas?

Ken

http://congress.techpolitics.org/108thfirst.php

# query mysql to get data
$get_data_query = select fullhouse2.Representative, fullhouse2.Party,
medicarerollcall669.State, medicarerollcall669.CD, hr2passage.passage, 
estatetaxrepeal.passage,
headstartvote444.vote, hudappropsvote453.vote, energyrollcall630.vote, 
medicarerollcall669.vote
from fullhouse2, medicarerollcall669, hr2passage, estatetaxrepeal, 
headstartvote444,
hudappropsvote453, energyrollcall630

where

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


Re: [PHP-DB] Missing Data in Columns

2003-12-10 Thread Ken Colburn
On Wed, 10 Dec 2003 16:21:39 -0600, Matt Matijevich 
[EMAIL PROTECTED] wrote:
snip
Any ideas?
/snip
could you post the code you use to output each table row?
***

Here's the code requested along with column headings and sort code:

# write out table heading
echo table width='75%' border='1' cellspacing='0' cellpadding='0' 
align='center' bgcolor='#99'\n;
echo tr\n;
echo tddiv align='center'font size='3'bRepresentative 
/b/font/div/td\n;
echo tddiv align='center'font size='3'bParty a 
href='108thfirst.php?sort_field=Partysort_order=asc' target='_self'font 
size='2'Sort/a /b/font/div/td\n;
echo tddiv align='center'font size='3'bState a 
href='108thfirst.php?sort_field=State, CDsort_order=asc' 
target='_self'font size='2'Sort/a /b/font/div/td\n;
echo tddiv align='center'font size='3'bDistrict 
/b/font/div/td\n;
echo tddiv align='center'font size='3'bVote a 
href='108thfirst.php?sort_field=hr2passage.passagesort_order=asc' 
target='_self'font size='2'Sort/a /b/font/div/td\n;
echo tddiv align='center'font size='3'bVote a 
href='108thfirst.php?sort_field=estatetaxrepeal.passagesort_order=asc' 
target='_self'font size='2'Sort/a /b/font/div/td\n;
echo tddiv align='center'font size='3'bVote a 
href='108thfirst.php?sort_field=headstartvote444.votesort_order=asc' 
target='_self'font size='2'Sort/a /b/font/div/td\n;
echo tddiv align='center'font size='3'bVote a 
href='108thfirst.php?sort_field=hudappropsvote453.votesort_order=asc' 
target='_self'font size='2'Sort/a /b/font/div/td\n;
echo tddiv align='center'font size='3'bVote a 
href='108thfirst.php?sort_field=energyrollcall630.votesort_order=asc' 
target='_self'font size='2'Sort/a /b/font/div/td\n;
echo tddiv align='center'font size='3'bVote a 
href='108thfirst.php?sort_field=medicarerollcall669.votesort_order=asc' 
target='_self'font size='2'Sort/a /b/font/div/td\n;
echo /tr\n;

# write out each row
while ($row = mysql_fetch_assoc ($data_set))
{
echo tr\n;
foreach (array_keys($row) as $item)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: passing array data back to form in header?

2003-07-22 Thread Ken
hi guys,
  why don't you store all this array data in the session cookies, unset it
when you r not using it anymore? Because session can store object (include
array)

Aaron Wolski [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi Guys,

 the topic pretty much covers it. I have a script and if it errors out..
 I send a bunch of values back to the form. I'm having difficulity
 figuring out how to pass array data that is/was selected back to the
 form.

 I can send the non array values no problem - eg:

 header(Location: patternsedit.php?error=1id=.rawurlencode($id).
 designer=.rawurlencode($designer).
 name=.rawurlencode($name).
 overallDesc=.rawurlencode($overallDesc).
 patternsColumn=.rawurlencode($patternsColumn).
 patternsName=.rawurlencode($patternsName).
 price=.rawurlencode($price).
 alt1Title=.rawurlencode($alt1Title).
 alt1Desc=.rawurlencode($alt1Desc).
 alt2Title=.rawurlencode($alt2Title).
 alt2Desc=.rawurlencode($alt2Desc).
 alt3Title=.rawurlencode($alt3Title).
 alt3Desc=.rawurlencode($alt3Desc).
 alt4Title=.rawurlencode($alt4Title).
 alt4Desc=.rawurlencode($alt4Desc).
 alt5Title=.rawurlencode($alt5Title).
 alt5Desc=.rawurlencode($alt5Desc));
 exit;

 No clue how to add array data to the above and then integrated it back
 with a form?

 Any thoughts?

 Thanks!

 Aaron




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



Re: [PHP-DB] Re: how to notify admin by e-mail only once if mysq

2002-04-14 Thread Ken Thompson

On Sunday 14 April 2002 03:24 pm, Ruprecht Helms wrote:
 Hi Lisi,

  Pardon my ignorance, but what's webmin?

 not a problem. Webmin is a webbased administrationtool
 for different things to administrate. It begins from
 useraccounting and ends by administration squid, apache,
 postfix/qmail, samba, and others.

 Regards,
 Ruprecht

 --
 E-Mail: Ruprecht Helms [EMAIL PROTECTED]
 Date: 14-Apr-02
 Time: 23:21:26

 to be informed - http://www.rheyn.de -

 This message was sent by XFMail
 --
On a Linux system you can find Webmin by typing http://localhost:1
Some systems require a secure connection to Webmin, in that case you'd type 
https://localhost:1
HTH
-- 
Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




Re: [PHP-DB] Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Ken Thompson

On Tuesday 05 March 2002 05:11 pm, Andy wrote:
 So what is the proper function in PHP to convert the MySQL timestamp into a
 proper format like Sonday, Apr. 20th 2002?

?php
echo date(D. M. d, Y)
?

 Thanx,

  Andy


 Jason Wong [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]...

  On Wednesday 06 March 2002 04:31, Andy wrote:
   Hi there,
  
   I am playing around with the timestamp functions. I created a timestamp
   with mysql ( the row is timestamp)
   and do reformat this thing after selecting with php in the folowíng
   way:
  
$date_posted[$i] = strftime(%A, %d-%m-%Y %R, $date_posted[$i]);
  
   This always returns Tuesday, 19-01-2038 but the mysql timestamp says:
   20020305211704
 
  They return the time in different formats. Read the MySQL manual then
  read the PHP manual (or vice-versa).
 
  The MySQL timestamp is human readable. So in your example above:
 
  20020305211704 == 2002-03-05 21:17:04
 
  time() in PHP is the number of seconds since the Unix Epoch.
 
  --
  Jason Wong - Gremlins Associates - www.gremlins.com.hk
 
  /*
  But, officer, he's not drunk, I just saw his fingers twitch!
  */

-- 


Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




Re: [PHP-DB] any php/Linux gurus out there?

2002-03-04 Thread Ken Thompson

On Monday 04 March 2002 05:54 pm, Pedro M. S. Oliveira wrote:
 you could complile the hole program instead of the rpm, just read
 README.install from the php source tar file.
 or you can install the other rpms that are lacking.
 or even so, not such a good ideia, but you can force the installationg
 using the command
 rpm -i --nodeps php
 or
 rpm -U --nodeps phpxxx

 - Original Message -
 From: Peter Lovatt [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 04, 2002 11:52 PM
 Subject: [PHP-DB] any php/Linux gurus out there?

  Hi
 
  I am running the security upgrade and am getting the following error when

 I

  run the RPM
  The install is RH 7.0 and was pre-installed. I had assumed that the RPMs
  from Redhat would match the pre installed version, as it was standard.
 
  I am a humble programmer (and part time sys admin!), rather than a

 Linux/RH

  guru, so would appreciate some advice. What is the best way to deal with
  this ?
 
 
  error: failed dependencies:
  libcrypto.so.1 is needed by php-4.0.6-9.7.0
  libmm.so.11 is needed by php-4.0.6-9.7.0
  libssl.so.1 is needed by php-4.0.6-9.7.0
  libcrypto.so.1 is needed by php-imap-4.0.6-9.7.0
   
Go to www.rpmfind.net and search for the dependent library's .
Use rpm -ivh to install along side any others of a different release version 
and you should make out OK.
 
 
  ---
  Excellence in internet and open source software
  ---
  Sunmaia
  www.sunmaia.net
  [EMAIL PROTECTED]
  tel. 0121-242-1473
  ---
 
  sql table
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

-- 


Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




Re: [PHP-DB] Retrieving a date.

2002-03-03 Thread Ken Thompson

On Sunday 03 March 2002 02:48 am, DL Neil wrote:
 Ken,

   Check out DAYOFMONTH() and MONTH() and a wealth of other useful date
   functions. RTFM: 6.3.4 Date and Time Functions
 
  There's a few interesting items here OK, Thanks for the pointer.

 Go for it...

   The answer to your question about AUTO_INCREMENT 'reset' can be

 found at

   6.5.3 CREATE TABLE Syntax under table_options.
 
 
  EH? It says what?? I'm so green that this makes NO sense at all.
 
  Regards,table_options:
  TYPE = {BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM |

 MYISAM }

  or  AUTO_INCREMENT = #

 You asked:
  Off Topic,  I saw something about resetting the auto-increment

 counter, but

  now I can't find reference to it. Can some kind soul enlighten me???

 Sorry to overwhelm you with jargon - it can be difficult to assess a
 person's capabilities over the email. So by way of a general answer may
 I point you at the MySQL and PHP web site home pages, and from there to
 their links to tutorial books and web sites. These will help you with
 concepts and examples.

 The reference to 6.5.3 CREATE TABLE Syntax is in the electronic manual
 at http://www.mysql.com/doc/C/R/CREATE_TABLE.html. The CREATE TABLE
 command enables you to (re-)build a table by defining its 'schema'
 (definitions, rules and/or constraints). The very next section of the
 manual, 6.5.4 ALTER TABLE Syntax deals with making changes to a table's
 structure.

 If you are starting from scratch the former applies. If amending an
 existing table, then the latter is of more interest. Logically enough
 both follow much the same rules in terms of what you can/can't do.

 Reading the CREATE TABLE command 'template', we see:

 CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
 [(create_definition,...)]
 [table_options] [select_statement]

 table options is therefore something that may be included almost at
 the end of the command. may is indicated by the square brackets =
 optional. So a 'bare' command would include the words CREATE and TABLE,
 followed by a table name, and then defining one or more fields within
 parentheses. eg

 CREATE TABLE Cinfo
 ( Cid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
   Fname  TEXT)

 The contents of the parentheses - a list of fields and their
 definitions, are templated by the two lists: create_definition and
 type. Once the fields are defined (and the parentheses closed) you MAY
 then decide to add further descriptions of the table. These are defined
 in the table_options definitions, and include an additional
 specification of interest to you:

 AUTO_INCREMENT = #

 If you add this clause to the above and replace the # with a suitable
 integer, you can define the starting sequence number to be used in the
 ID column, eg:

 CREATE TABLE Cinfo
 ( Cid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
   Fname  TEXT)
 AUTO_INCREMENT = 1001;

 Hope that's enough to get you re-started. If you plug AUTO_INCREMENT
 into the electronic manual's search facility you find a ton of stuff
 showing you how to use such columns/series - and a few warnings.

 Ok?
 =dn
Great, that explains better than most of the tutorials I've read.
It is unfortunate that most if not all reference documentation expect the 
reader to have a college degree just on their subject in order to understand 
wot in 'ell they're saying.
I've done pretty well in figuring out many thing on my own but sometimes ya 
just need an expert to chip in and make yer day.
My thanks,
-- 
Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




[PHP-DB] Retrieving date, partially solved

2002-03-02 Thread Ken Thompson

I have the thing returning the date as long as the date format is m/d in 
the table with a seperate year column.
Here's the table:

mysql select * from Cinfo;
+-++--+---+---+
| Cid | Fname  | Lname| Bday  | Byear |
+-++--+---+---+
|   1 | Lars   | Larsen   | 03/02 | 1960  |
|   2 | Larry  | Loophole | 03/02 | 1950  |
|   3 | Fuzzy  | Wimp | 03/02 | 1990  |
|   4 | Willy  | Warp | 03/03 | 1960  |
|   5 | Harry  | Toes | 03/03 | 1998  |
|   6 | Jiminy | Cricket  | 03/04 | 1889  |
+-++--+---+---+
6 rows in set (0.00 sec)

Here's the code, I would welcome comments or improvements.

$db = mysql_connect(localhost, root);
$Date = date(m/d);
mysql_select_db(customers,$db);

$result = mysql_query(SELECT * FROM Cinfo WHERE Bday = '$Date');

The result is sent to a table and to my surprise actually works...
-- 
Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




Re: [PHP-DB] Retrieving a date.

2002-03-02 Thread Ken Thompson

On Saturday 02 March 2002 16:13, DL Neil wrote:
 Ken,

 Check out DAYOFMONTH() and MONTH() and a wealth of other useful date
 functions. RTFM: 6.3.4 Date and Time Functions

There's a few interesting items here OK, Thanks for the pointer.

 The answer to your question about AUTO_INCREMENT 'reset' can be found at
 6.5.3 CREATE TABLE Syntax under table_options.
   
EH? It says what?? I'm so green that this makes NO sense at all.
  
Regards,table_options:
TYPE = {BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM }
or  AUTO_INCREMENT = #

 =dn

-- 
Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




[PHP-DB] Retrieving a date.

2002-03-01 Thread Ken Thompson

I have a test table with the ususal  customer information in it along with a 
field for the date of birth. I'm trying to return records of any customers 
whose birthdates are the same day and month as the current date.
Here's the query  result:
mysql SELECT * FROM Cinfo WHERE BirthDate  = date('m d');
Empty set (0.00 sec)
Here's what is returned with a global query:
mysql  select * from Cinfo;
+---+--+---+-+---++--+--+--+++
| FirstName | LastName | Address   | City| State | Zip| 
HomePhone| WorkPhone| CellPhone| BirthDate  | id |
+---+--+---+-+---++--+--+--+++
| Joe   | Blow | 1200 High St. #12 | St.Looy | UT| 844110 | 
801-111-2299 | 801-111-3456 | 801-213-8956 | 1959-03-01 |  1 |
|   |  |   | |   ||   
   |  |  ||  2 |
|   |  |   | |   ||   
   |  |  ||  3 |
|   |  |   | |   ||   
   |  |  ||  4 |
+---+--+---+-+---++--+--+--+++
4 rows in set (0.00 sec)

I have a feeling it's the date format in the table. I tried making it a date 
field but just got the current date. What am I doing wrong? 
Off Topic,  I saw something about resetting the auto-increment counter, but 
now I can't find reference to it. Can some kind soul enlighten me???
-- 


Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




Re: [PHP-DB] Resource link errors

2002-02-09 Thread Ken Thompson



Thanks Rick, Now it works.


On Thursday 07 February 2002 03:04 pm, Rick Emery wrote:
 The following means you have not opened a link to your database.
 Concerntrate your efforts there.

 Warning: Supplied argument is not a valid MySQL-Link
 resource in /var/www/html/list.php3 on line 26

 -Original Message-
 From: Ken Thompson [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 3:23 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Resource link errors


 Hello all,
 I'm very new to php and have been beating my head on the wall over this for
 2
 days. I've searched through the php documentation but I guess I either
 don't

 know where or what to look for or don't understand what I'm seeing.
 I think this has to be an array but the original doesn't seem to think
 so.(see below)
 I've tried ($myrow = mysql_fetch_array($result)) and still get the same
 errors.
 The original that I used as an example works OK showing the results of
 Name,

 Position. They didn't include a data cell for $myrow[3] ...
 =
 THIS WORKS:
 ?php

 $title = Welcome to the Web-Site of; /*I commented this out and finaly
 removed it cuz I don't want the title echoed in the final page.*/

 include(header.inc);

 $result = mysql_query(SELECT * FROM employees,$db);

 echo table border=1\n;

 echo trtdName/tdtdPosition/tr\n;

 while ($myrow = mysql_fetch_row($result)) {

 echo(trtd%s %s/tdtd%s/tr\n, $myrow[1], $myrow[2],
 $myrow[3]);

 }

 echo /table\n;
 include(footer.inc);

 ?
 ===
 What I am trying to do is to return the results of the query into a table
 with these items:
 +---+-+--+-+-++

 | Field | Type| Null | Key | Default | Extra  |

 +---+-+--+-+-++

 | id| tinyint(4)  |  | PRI | NULL| auto_increment |
 | year  | int(4)  | YES  | | NULL||
 | make  | varchar(20) | YES  | | NULL||
 | model | varchar(20) | YES  | | NULL||
 | engine| varchar(20) | YES  | | NULL||
 | fuel  | varchar(8)  | YES  | | NULL||
 | trans | varchar(10) | YES  | | NULL||
 | condition | varchar(20) | YES  | | NULL||
 | price | varchar(10) | YES  | | 0   ||
 | location  | varchar(20) | YES  | | NULL||

 +---+-+--+-+-++
 These are the errors that show up when I run the page in the browser.
 The database is local and I'm on Linux-Mandrake 8.1 using Apache web
 server. I can get the results I want from the command line, that is I can
 make queries and get the proper info returned.
 what have I done to cause it not to work?


 Warning: Supplied argument is not a valid MySQL-Link
 resource in /var/www/html/list.php3 on line 26

 Warning: Supplied argument is not a valid MySQL result
 resource in /var/www/html/list.php3 on line 32

  THIS DOESN'T:
 I get the table and the item name e.g. Year, Make etc.
 Once I get the 3 cells returning the proper info, I want to add the rest of
 the cells needed to display all the info in the web page. I don't think it
 should be a problem, comments on this?

 ?php

 include(header.inc);

 //(Line 26 below, everything above ?php is plain html.)
 $result = mysql_query(SELECT * FROM autos,$db);

 echo table border=1\n;

 echo trtdYear/tdtdMake/tdtdModel/td/tr\n;

 //(Line 32 below)
 while ($myrow = mysql_fetch_row($result)) {

 //What does the '%s' mean? I read it someplace in the tutorial
 //but can't find it now.

 printf(trtd%s %s/tdtd%s/tr\n, $myrow[1], $myrow[2],
 $myrow[3]);

 }

 echo /table\n;
 include(footer.inc);

 ?

-- 

Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936


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




[PHP-DB] Resource link errors

2002-02-07 Thread Ken Thompson

Hello all,
I'm very new to php and have been beating my head on the wall over this for 2 
days. I've searched through the php documentation but I guess I either don't 
know where or what to look for or don't understand what I'm seeing.
I think this has to be an array but the original doesn't seem to think
so.(see below) 
I've tried ($myrow = mysql_fetch_array($result)) and still get the same 
errors.
The original that I used as an example works OK showing the results of Name, 
Position. They didn't include a data cell for $myrow[3] ...
=
THIS WORKS:
?php

$title = Welcome to the Web-Site of; /*I commented this out and finaly 
removed it cuz I don't want the title echoed in the final page.*/

include(header.inc);

$result = mysql_query(SELECT * FROM employees,$db);

echo table border=1\n;

echo trtdName/tdtdPosition/tr\n;

while ($myrow = mysql_fetch_row($result)) {

echo(trtd%s %s/tdtd%s/tr\n, $myrow[1], $myrow[2], 
$myrow[3]);

}

echo /table\n;
include(footer.inc);

?
===
What I am trying to do is to return the results of the query into a table 
with these items:
+---+-+--+-+-++
| Field | Type| Null | Key | Default | Extra  |
+---+-+--+-+-++
| id| tinyint(4)  |  | PRI | NULL| auto_increment |
| year  | int(4)  | YES  | | NULL||
| make  | varchar(20) | YES  | | NULL||
| model | varchar(20) | YES  | | NULL||
| engine| varchar(20) | YES  | | NULL||
| fuel  | varchar(8)  | YES  | | NULL||
| trans | varchar(10) | YES  | | NULL||
| condition | varchar(20) | YES  | | NULL||
| price | varchar(10) | YES  | | 0   ||
| location  | varchar(20) | YES  | | NULL||
+---+-+--+-+-++
These are the errors that show up when I run the page in the browser.
The database is local and I'm on Linux-Mandrake 8.1 using Apache web server.
I can get the results I want from the command line, that is I can make 
queries and get the proper info returned. 
what have I done to cause it not to work?


Warning: Supplied argument is not a valid MySQL-Link 
resource in /var/www/html/list.php3 on line 26
 
Warning: Supplied argument is not a valid MySQL result 
resource in /var/www/html/list.php3 on line 32

 THIS DOESN'T:
I get the table and the item name e.g. Year, Make etc. 
Once I get the 3 cells returning the proper info, I want to add the rest of 
the cells needed to display all the info in the web page. I don't think it 
should be a problem, comments on this?

?php

include(header.inc);

//(Line 26 below, everything above ?php is plain html.) 
$result = mysql_query(SELECT * FROM autos,$db);

echo table border=1\n;

echo trtdYear/tdtdMake/tdtdModel/td/tr\n;

//(Line 32 below) 
while ($myrow = mysql_fetch_row($result)) {

//What does the '%s' mean? I read it someplace in the tutorial
//but can't find it now.

printf(trtd%s %s/tdtd%s/tr\n, $myrow[1], $myrow[2], 
$myrow[3]);

}

echo /table\n;
include(footer.inc);

?
-- 

Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




Re: [PHP-DB] MySQL

2002-02-04 Thread Ken Thompson

I'm just learning MySQL and PHP so this fresh from my last snoop through the 
documentation, hope it will help.

From the command line you can make a global query like - SELECT * FROM pets;
and all the info stored in the table will be shown.

To update a record use the update query:
UPDATE pet SET birth = 1998-04-15 WHERE name = Kitty;
This changes only one record at a time.

I hope this will also work from a shell account on a web hosting service it 
should..
As mentioned earlier phpMyAdmin is very nice and makes life a lot more fun 
G... BUT not all hosting services have phpMyAdmin installed so ya gotta do 
it the hard way..

On Monday 04 February 2002 09:34 am, you wrote:
 Go download PHPMyAdmin.


 - Original Message -
 From: Morten Nielsen [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, February 04, 2002 8:34 AM
 Subject: [PHP-DB] MySQL

  Hi,
  Is there an easy way to see the data in a table?
  I made a table that contains information about people. How do I
  see/change the contenst of the table?
 
  Thanks,
  Morten
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

-- 

Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




Re: [PHP-DB] MySQL connect

2002-02-04 Thread Ken Thompson

On Monday 04 February 2002 10:54 am, you wrote:
 Hi all,

 Ok I am learning this on my own but I could use some help.
 I have started these two pages test.php and config.php here is the code:

 test.php

 ?
 // include the database configuration
 include config.php;

In looking at my include page I noticed there were parenthisis around the 
include statement, maybe this is your problem.
include(header.inc);

 // connect to database
 mysql_connect($db[host],$db[user],$db[password],$db[database]) or
 die (sorry not successful);

 // if no connect then exit
 exit;

 // if connect successful
 echo (you have connected);
 ?

 config.php

 ?

 // database config
 $db[host] = localhost;
 $db[user] = me;
 $db[password] = mypassword;
 $db[database] = mydb;

 ?

 All I'm trying to do is successfully connect to the database but it returns
 sorry not successful. What have I done wrong?
 I have gone straight from the php pocket reference manual and it doesn't
 work. Would someone please explain what has happened?

 Thanks
 J Leonard



-- 
Ken Thompson, North West Antique Autos
Payette, Idaho
Email: [EMAIL PROTECTED]
http://www.nwaa.com
Sales and brokering of antique autos and parts.

Linux- Coming Soon To A Desktop Near You
Registered Linux User #183936

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




[PHP-DB] nysql_query confusing selects for inserts?

2002-01-03 Thread Ken Kinder

This is extremely annoying. For some reason, mysql_query seems to be 
confusing my left join for an insert or update. The reason being, that the 
query runs fine, but the result isn't usable. Here's the example code. Table 
definitions are below if that helps.

$err = 0;
// $result = mysql_query(select * from lead);
$result = mysql_query($sql) || $err = 1;

if ($err || !$result) {
  print h3SQL Error/h3\n;
  print pre . mysql_error() . /pre\n;
} else {
  print h3Result Sample/h3\n;
  print table border=0 cellpadding=2 cellspacing=2 class=entry\n;
  $c = 0;
  while ($row = mysql_fetch_array($result)) {

As you can see, I both check for $result being untrue, and I use the || 
operator to catch execution failures. $result seems to be simply equal to 1. 
On the last line, I get:

Warning: Supplied argument is not a valid MySQL result resource in 
/home/ken/Projects/leadmgr/query_leads_step1.php on line 95

But the query itself doesn't seem to fall, or the print h3SQL Error/h3 
would print.

The query I'm trying is:

select
lead.lead_id,
lead.firstname,
lead.lastname,
lead_support_1.plusfour
from
lead
left join lead_support_1 on lead.lead_support_id = lead_support_1_id

which works fine on the MySQL command line. Here are the create definitions:

CREATE TABLE `lead` (
  `lead_id` int(11) NOT NULL auto_increment,
  `lead_import_id` int(11) NOT NULL default '0',
  `lead_source_id` int(11) NOT NULL default '0',
  `firstname` varchar(50) default NULL,
  `lastname` varchar(50) default NULL,
  `phone` varchar(35) default NULL,
  `fax` varchar(35) default NULL,
  `alt_phone` varchar(35) default NULL,
  `address1` varchar(100) default NULL,
  `address2` varchar(100) default NULL,
  `city` varchar(100) default NULL,
  `state` char(2) default NULL,
  `zip` varchar(25) default NULL,
  `country` varchar(50) default NULL,
  `email` varchar(255) default NULL,
  `other_unique_num` int(11) default NULL,
  `lead_field_set_id` int(11) default NULL,
  `lead_support_id` int(11) default NULL,
  PRIMARY KEY  (`lead_id`),
  UNIQUE KEY `other_unique_num` (`other_unique_num`,`lead_source_id`)
) TYPE=MyISAM

Now for lead_support_1:

CREATE TABLE `lead_support_1` (
  `lead_support_1_id` int(11) NOT NULL auto_increment,
  `purchase_value` float default NULL,
  `mortgage_value` float default NULL,
  `carrier_route` varchar(4) default NULL,
  `condo_code` char(1) default NULL,
  `publish_date` date default NULL,
  `area_code` char(3) default NULL,
  `grantee_name` varchar(26) default NULL,
  `typedoc` char(1) default NULL,
  `delivery_point` char(2) default NULL,
  `check_digit` char(1) default NULL,
  `sale_type` char(1) default NULL,
  `loan_type` char(1) default NULL,
  `rate_type` char(1) default NULL,
  `plusfour` varchar(4) default NULL,
  `sale_date` date default NULL,
  `lender_name` varchar(25) default NULL,
  `country_code` char(3) default NULL,
  `record_type` char(1) default NULL,
  `spouse_indicator` char(1) default NULL,
  `client_key` varchar(4) default NULL,
  `serial_number` varchar(8) default NULL,
  `line_of_travel` varchar(6) default NULL,
  `job_number` varchar(8) default NULL,
  `y2k_publish_date` date default NULL,
  `y2k_sale_date` date default NULL,
  PRIMARY KEY  (`lead_support_1_id`)
) TYPE=MyISAM

PHP Version: php-4.0.6-7 RPM with RH 7.2
MySQL Version: mysql  Ver 11.15 Distrib 3.23.44, for pc-linux-gnu (i686)

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] nysql_query confusing selects for inserts?

2002-01-03 Thread Ken Kinder

Yes, I copied it verbatium and copied it right from the HTML source into this 
email.

On Thursday 03 January 2002 11:22 am, Rick Emery wrote:
 Have you actually print out $sql before its execution then
 copied-and-pasted it to the MYSQL command line.
 Or are you assuming that because you typed it into the MYSQL command line,
 then it must be correct?

 -Original Message-
 From: Ken Kinder [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 03, 2002 12:08 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] nysql_query confusing selects for inserts?


 This is extremely annoying. For some reason, mysql_query seems to be
 confusing my left join for an insert or update. The reason being, that the
 query runs fine, but the result isn't usable. Here's the example code.
 Table

 definitions are below if that helps.

 $err = 0;
 // $result = mysql_query(select * from lead);
 $result = mysql_query($sql) || $err = 1;

 if ($err || !$result) {
   print h3SQL Error/h3\n;
   print pre . mysql_error() . /pre\n;
 } else {
   print h3Result Sample/h3\n;
   print table border=0 cellpadding=2 cellspacing=2 class=entry\n;
   $c = 0;
   while ($row = mysql_fetch_array($result)) {

 As you can see, I both check for $result being untrue, and I use the ||
 operator to catch execution failures. $result seems to be simply equal to
 1.

 On the last line, I get:

 Warning: Supplied argument is not a valid MySQL result resource in
 /home/ken/Projects/leadmgr/query_leads_step1.php on line 95

 But the query itself doesn't seem to fall, or the print h3SQL
 Error/h3

 would print.

 The query I'm trying is:

 select
   lead.lead_id,
   lead.firstname,
   lead.lastname,
   lead_support_1.plusfour
 from
   lead
   left join lead_support_1 on lead.lead_support_id = lead_support_1_id

 which works fine on the MySQL command line. Here are the create
 definitions:

 CREATE TABLE `lead` (
   `lead_id` int(11) NOT NULL auto_increment,
   `lead_import_id` int(11) NOT NULL default '0',
   `lead_source_id` int(11) NOT NULL default '0',
   `firstname` varchar(50) default NULL,
   `lastname` varchar(50) default NULL,
   `phone` varchar(35) default NULL,
   `fax` varchar(35) default NULL,
   `alt_phone` varchar(35) default NULL,
   `address1` varchar(100) default NULL,
   `address2` varchar(100) default NULL,
   `city` varchar(100) default NULL,
   `state` char(2) default NULL,
   `zip` varchar(25) default NULL,
   `country` varchar(50) default NULL,
   `email` varchar(255) default NULL,
   `other_unique_num` int(11) default NULL,
   `lead_field_set_id` int(11) default NULL,
   `lead_support_id` int(11) default NULL,
   PRIMARY KEY  (`lead_id`),
   UNIQUE KEY `other_unique_num` (`other_unique_num`,`lead_source_id`)
 ) TYPE=MyISAM

 Now for lead_support_1:

 CREATE TABLE `lead_support_1` (
   `lead_support_1_id` int(11) NOT NULL auto_increment,
   `purchase_value` float default NULL,
   `mortgage_value` float default NULL,
   `carrier_route` varchar(4) default NULL,
   `condo_code` char(1) default NULL,
   `publish_date` date default NULL,
   `area_code` char(3) default NULL,
   `grantee_name` varchar(26) default NULL,
   `typedoc` char(1) default NULL,
   `delivery_point` char(2) default NULL,
   `check_digit` char(1) default NULL,
   `sale_type` char(1) default NULL,
   `loan_type` char(1) default NULL,
   `rate_type` char(1) default NULL,
   `plusfour` varchar(4) default NULL,
   `sale_date` date default NULL,
   `lender_name` varchar(25) default NULL,
   `country_code` char(3) default NULL,
   `record_type` char(1) default NULL,
   `spouse_indicator` char(1) default NULL,
   `client_key` varchar(4) default NULL,
   `serial_number` varchar(8) default NULL,
   `line_of_travel` varchar(6) default NULL,
   `job_number` varchar(8) default NULL,
   `y2k_publish_date` date default NULL,
   `y2k_sale_date` date default NULL,
   PRIMARY KEY  (`lead_support_1_id`)
 ) TYPE=MyISAM

 PHP Version: php-4.0.6-7 RPM with RH 7.2
 MySQL Version: mysql  Ver 11.15 Distrib 3.23.44, for pc-linux-gnu (i686)

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] nysql_query confusing selects for inserts?

2002-01-03 Thread Ken Kinder

It does/did. I add this print statement:

$result = mysql_query($sql) || $err = 1;
print preb$sql/b/pre\n;

And it yields this:

prebselect
lead.lead_id,
lead.firstname,
lead.lastname,
lead_support_1.area_code
from
lead
left join lead_support_1 on lead.lead_support_id = lead_support_1_id
/b/pre

On Thursday 03 January 2002 11:40 am, Rick Emery wrote:
 So show us the print out when you printed $sql.  I'm certain it did not
 look like:
 select
   lead.lead_id,
   lead.firstname,
   lead.lastname,
   lead_support_1.plusfour
 from
   lead
   left join lead_support_1 on lead.lead_support_id = lead_support_1_id

 But rather, it was in one log string.

 -Original Message-
 From: Ken Kinder [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 03, 2002 12:33 PM
 To: Rick Emery; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] nysql_query confusing selects for inserts?


 Yes, I copied it verbatium and copied it right from the HTML source into
 this
 email.

 On Thursday 03 January 2002 11:22 am, Rick Emery wrote:
  Have you actually print out $sql before its execution then
  copied-and-pasted it to the MYSQL command line.
  Or are you assuming that because you typed it into the MYSQL command
  line, then it must be correct?
 
  -Original Message-
  From: Ken Kinder [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 03, 2002 12:08 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] nysql_query confusing selects for inserts?
 
 
  This is extremely annoying. For some reason, mysql_query seems to be
  confusing my left join for an insert or update. The reason being, that
  the query runs fine, but the result isn't usable. Here's the example
  code. Table
 
  definitions are below if that helps.
 
  $err = 0;
  // $result = mysql_query(select * from lead);
  $result = mysql_query($sql) || $err = 1;
 
  if ($err || !$result) {
print h3SQL Error/h3\n;
print pre . mysql_error() . /pre\n;
  } else {
print h3Result Sample/h3\n;
print table border=0 cellpadding=2 cellspacing=2 class=entry\n;
$c = 0;
while ($row = mysql_fetch_array($result)) {
 
  As you can see, I both check for $result being untrue, and I use the ||
  operator to catch execution failures. $result seems to be simply equal to
  1.
 
  On the last line, I get:
 
  Warning: Supplied argument is not a valid MySQL result resource in
  /home/ken/Projects/leadmgr/query_leads_step1.php on line 95
 
  But the query itself doesn't seem to fall, or the print h3SQL
  Error/h3
 
  would print.
 
  The query I'm trying is:
 
  select
  lead.lead_id,
  lead.firstname,
  lead.lastname,
  lead_support_1.plusfour
  from
  lead
  left join lead_support_1 on lead.lead_support_id = lead_support_1_id
 
  which works fine on the MySQL command line. Here are the create
  definitions:
 
  CREATE TABLE `lead` (
`lead_id` int(11) NOT NULL auto_increment,
`lead_import_id` int(11) NOT NULL default '0',
`lead_source_id` int(11) NOT NULL default '0',
`firstname` varchar(50) default NULL,
`lastname` varchar(50) default NULL,
`phone` varchar(35) default NULL,
`fax` varchar(35) default NULL,
`alt_phone` varchar(35) default NULL,
`address1` varchar(100) default NULL,
`address2` varchar(100) default NULL,
`city` varchar(100) default NULL,
`state` char(2) default NULL,
`zip` varchar(25) default NULL,
`country` varchar(50) default NULL,
`email` varchar(255) default NULL,
`other_unique_num` int(11) default NULL,
`lead_field_set_id` int(11) default NULL,
`lead_support_id` int(11) default NULL,
PRIMARY KEY  (`lead_id`),
UNIQUE KEY `other_unique_num` (`other_unique_num`,`lead_source_id`)
  ) TYPE=MyISAM
 
  Now for lead_support_1:
 
  CREATE TABLE `lead_support_1` (
`lead_support_1_id` int(11) NOT NULL auto_increment,
`purchase_value` float default NULL,
`mortgage_value` float default NULL,
`carrier_route` varchar(4) default NULL,
`condo_code` char(1) default NULL,
`publish_date` date default NULL,
`area_code` char(3) default NULL,
`grantee_name` varchar(26) default NULL,
`typedoc` char(1) default NULL,
`delivery_point` char(2) default NULL,
`check_digit` char(1) default NULL,
`sale_type` char(1) default NULL,
`loan_type` char(1) default NULL,
`rate_type` char(1) default NULL,
`plusfour` varchar(4) default NULL,
`sale_date` date default NULL,
`lender_name` varchar(25) default NULL,
`country_code` char(3) default NULL,
`record_type` char(1) default NULL,
`spouse_indicator` char(1) default NULL,
`client_key` varchar(4) default NULL,
`serial_number` varchar(8) default NULL,
`line_of_travel` varchar(6) default NULL,
`job_number` varchar(8) default NULL,
`y2k_publish_date` date default NULL,
`y2k_sale_date` date default NULL,
PRIMARY KEY  (`lead_support_1_id`)
  ) TYPE=MyISAM
 
  PHP Version: php

Re: [PHP-DB] nysql_query confusing selects for inserts?

2002-01-03 Thread Ken Kinder

I saved the query to a file, did a diff, and it does have one difference: 
there are DOS newlines in the string. Could that do it? Do you know how to 
strip those out?

On Thursday 03 January 2002 11:40 am, Rick Emery wrote:
 So show us the print out when you printed $sql.  I'm certain it did not
 look like:
 select
   lead.lead_id,
   lead.firstname,
   lead.lastname,
   lead_support_1.plusfour
 from
   lead
   left join lead_support_1 on lead.lead_support_id = lead_support_1_id

 But rather, it was in one log string.

 -Original Message-
 From: Ken Kinder [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 03, 2002 12:33 PM
 To: Rick Emery; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] nysql_query confusing selects for inserts?


 Yes, I copied it verbatium and copied it right from the HTML source into
 this
 email.

 On Thursday 03 January 2002 11:22 am, Rick Emery wrote:
  Have you actually print out $sql before its execution then
  copied-and-pasted it to the MYSQL command line.
  Or are you assuming that because you typed it into the MYSQL command
  line, then it must be correct?
 
  -Original Message-
  From: Ken Kinder [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 03, 2002 12:08 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] nysql_query confusing selects for inserts?
 
 
  This is extremely annoying. For some reason, mysql_query seems to be
  confusing my left join for an insert or update. The reason being, that
  the query runs fine, but the result isn't usable. Here's the example
  code. Table
 
  definitions are below if that helps.
 
  $err = 0;
  // $result = mysql_query(select * from lead);
  $result = mysql_query($sql) || $err = 1;
 
  if ($err || !$result) {
print h3SQL Error/h3\n;
print pre . mysql_error() . /pre\n;
  } else {
print h3Result Sample/h3\n;
print table border=0 cellpadding=2 cellspacing=2 class=entry\n;
$c = 0;
while ($row = mysql_fetch_array($result)) {
 
  As you can see, I both check for $result being untrue, and I use the ||
  operator to catch execution failures. $result seems to be simply equal to
  1.
 
  On the last line, I get:
 
  Warning: Supplied argument is not a valid MySQL result resource in
  /home/ken/Projects/leadmgr/query_leads_step1.php on line 95
 
  But the query itself doesn't seem to fall, or the print h3SQL
  Error/h3
 
  would print.
 
  The query I'm trying is:
 
  select
  lead.lead_id,
  lead.firstname,
  lead.lastname,
  lead_support_1.plusfour
  from
  lead
  left join lead_support_1 on lead.lead_support_id = lead_support_1_id
 
  which works fine on the MySQL command line. Here are the create
  definitions:
 
  CREATE TABLE `lead` (
`lead_id` int(11) NOT NULL auto_increment,
`lead_import_id` int(11) NOT NULL default '0',
`lead_source_id` int(11) NOT NULL default '0',
`firstname` varchar(50) default NULL,
`lastname` varchar(50) default NULL,
`phone` varchar(35) default NULL,
`fax` varchar(35) default NULL,
`alt_phone` varchar(35) default NULL,
`address1` varchar(100) default NULL,
`address2` varchar(100) default NULL,
`city` varchar(100) default NULL,
`state` char(2) default NULL,
`zip` varchar(25) default NULL,
`country` varchar(50) default NULL,
`email` varchar(255) default NULL,
`other_unique_num` int(11) default NULL,
`lead_field_set_id` int(11) default NULL,
`lead_support_id` int(11) default NULL,
PRIMARY KEY  (`lead_id`),
UNIQUE KEY `other_unique_num` (`other_unique_num`,`lead_source_id`)
  ) TYPE=MyISAM
 
  Now for lead_support_1:
 
  CREATE TABLE `lead_support_1` (
`lead_support_1_id` int(11) NOT NULL auto_increment,
`purchase_value` float default NULL,
`mortgage_value` float default NULL,
`carrier_route` varchar(4) default NULL,
`condo_code` char(1) default NULL,
`publish_date` date default NULL,
`area_code` char(3) default NULL,
`grantee_name` varchar(26) default NULL,
`typedoc` char(1) default NULL,
`delivery_point` char(2) default NULL,
`check_digit` char(1) default NULL,
`sale_type` char(1) default NULL,
`loan_type` char(1) default NULL,
`rate_type` char(1) default NULL,
`plusfour` varchar(4) default NULL,
`sale_date` date default NULL,
`lender_name` varchar(25) default NULL,
`country_code` char(3) default NULL,
`record_type` char(1) default NULL,
`spouse_indicator` char(1) default NULL,
`client_key` varchar(4) default NULL,
`serial_number` varchar(8) default NULL,
`line_of_travel` varchar(6) default NULL,
`job_number` varchar(8) default NULL,
`y2k_publish_date` date default NULL,
`y2k_sale_date` date default NULL,
PRIMARY KEY  (`lead_support_1_id`)
  ) TYPE=MyISAM
 
  PHP Version: php-4.0.6-7 RPM with RH 7.2
  MySQL Version: mysql  Ver 11.15 Distrib 3.23.44, for pc-linux-gnu (i686)

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

Re: [PHP-DB] nysql_query confusing selects for inserts?

2002-01-03 Thread Ken Kinder

The query itself is built dynamically from form input, but I did get it 
resolved. I don't know why, but with dos carage returns, it just didn't work.

Thanks for your thoughts.

On Thursday 03 January 2002 01:40 pm, Rick Emery wrote:
 That's what I wondered about.

 How are you building the SELECT statement.  I would have thought it'd be:
 $query = select lead.lead_id, lead.firstname, lead.lastname,
 lead_support_1.plusfour from lead left join lead_support_1 on
 lead.lead_support_id = lead_support_1_id

 -Original Message-
 From: Ken Kinder [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 03, 2002 2:32 PM
 To: Rick Emery; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] nysql_query confusing selects for inserts?


 I saved the query to a file, did a diff, and it does have one difference:
 there are DOS newlines in the string. Could that do it? Do you know how to
 strip those out?

 On Thursday 03 January 2002 11:40 am, Rick Emery wrote:
  So show us the print out when you printed $sql.  I'm certain it did not
  look like:
  select
  lead.lead_id,
  lead.firstname,
  lead.lastname,
  lead_support_1.plusfour
  from
  lead
  left join lead_support_1 on lead.lead_support_id = lead_support_1_id
 
  But rather, it was in one long string.
 
  -Original Message-
  From: Ken Kinder [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 03, 2002 12:33 PM
  To: Rick Emery; [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] nysql_query confusing selects for inserts?
 
 
  Yes, I copied it verbatium and copied it right from the HTML source into
  this
  email.
 
  On Thursday 03 January 2002 11:22 am, Rick Emery wrote:
   Have you actually print out $sql before its execution then
   copied-and-pasted it to the MYSQL command line.
   Or are you assuming that because you typed it into the MYSQL command
   line, then it must be correct?
  
   -Original Message-
   From: Ken Kinder [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, January 03, 2002 12:08 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP-DB] nysql_query confusing selects for inserts?
  
  
   This is extremely annoying. For some reason, mysql_query seems to be
   confusing my left join for an insert or update. The reason being, that
   the query runs fine, but the result isn't usable. Here's the example
   code. Table
  
   definitions are below if that helps.
  
   $err = 0;
   // $result = mysql_query(select * from lead);
   $result = mysql_query($sql) || $err = 1;
  
   if ($err || !$result) {
 print h3SQL Error/h3\n;
 print pre . mysql_error() . /pre\n;
   } else {
 print h3Result Sample/h3\n;
 print table border=0 cellpadding=2 cellspacing=2 class=entry\n;
 $c = 0;
 while ($row = mysql_fetch_array($result)) {
  
   As you can see, I both check for $result being untrue, and I use the ||
   operator to catch execution failures. $result seems to be simply equal

 to

   1.
  
   On the last line, I get:
  
   Warning: Supplied argument is not a valid MySQL result resource in
   /home/ken/Projects/leadmgr/query_leads_step1.php on line 95
  
   But the query itself doesn't seem to fall, or the print h3SQL
   Error/h3
  
   would print.
  
   The query I'm trying is:
  
   select
 lead.lead_id,
 lead.firstname,
 lead.lastname,
 lead_support_1.plusfour
   from
 lead
 left join lead_support_1 on lead.lead_support_id = lead_support_1_id
  
   which works fine on the MySQL command line. Here are the create
   definitions:
  
   CREATE TABLE `lead` (
 `lead_id` int(11) NOT NULL auto_increment,
 `lead_import_id` int(11) NOT NULL default '0',
 `lead_source_id` int(11) NOT NULL default '0',
 `firstname` varchar(50) default NULL,
 `lastname` varchar(50) default NULL,
 `phone` varchar(35) default NULL,
 `fax` varchar(35) default NULL,
 `alt_phone` varchar(35) default NULL,
 `address1` varchar(100) default NULL,
 `address2` varchar(100) default NULL,
 `city` varchar(100) default NULL,
 `state` char(2) default NULL,
 `zip` varchar(25) default NULL,
 `country` varchar(50) default NULL,
 `email` varchar(255) default NULL,
 `other_unique_num` int(11) default NULL,
 `lead_field_set_id` int(11) default NULL,
 `lead_support_id` int(11) default NULL,
 PRIMARY KEY  (`lead_id`),
 UNIQUE KEY `other_unique_num` (`other_unique_num`,`lead_source_id`)
   ) TYPE=MyISAM
  
   Now for lead_support_1:
  
   CREATE TABLE `lead_support_1` (
 `lead_support_1_id` int(11) NOT NULL auto_increment,
 `purchase_value` float default NULL,
 `mortgage_value` float default NULL,
 `carrier_route` varchar(4) default NULL,
 `condo_code` char(1) default NULL,
 `publish_date` date default NULL,
 `area_code` char(3) default NULL,
 `grantee_name` varchar(26) default NULL,
 `typedoc` char(1) default NULL,
 `delivery_point` char(2) default NULL,
 `check_digit` char(1) default NULL,
 `sale_type` char(1) default

[PHP-DB] ever send SMIME Encrypted mail from PHP4 Mail() to an OUTLOOK EXPRESS user?

2001-08-14 Thread Ken Sommers

hi,
has anyone ever sent SMIME Encrypted mail from a PHP4 script using the
Mail() function to an MS OUTLOOK EXPRESS user?
from a linux/apache/mysql/PHP4 Server?
I would like to be able to send Secure emails (from within my PHP scripts)
to the members of my site. After these members have gotten their FREE
Personal email cert from www.thawte.com.
anyone come across a tutorial or any docs on this?
thanks,

Ken



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Transforming doc files into html

2001-08-06 Thread Ken Sommers

try the html editor Arachnophilia :
http://www.arachnoid.com/arachnophilia/index.html

How to make your own page (the easy way)

You always have the option of creating a page from scratch, by entering the
HTML tags on your own. But, even with a lot of predefined tags, this takes a
long time, and you have to learn a lot about HTML as you go along.

But there is an easier way -- Arachnophilia will allow you to import a word
processing document that has been saved in Rich Text Format (RTF) and will
then convert it automatically into a Web page.

Some word processing programs will export their documents in the RTF format,
others won't, but you can still export them using one of the methods
described here. Here are the ways to get your document from your word
processor/spreadsheet/database to Arachnophilia:

· Simply save the document in the Rich Text Format (RTF) document type. Then
open it in Arachnophilia (File . Open File . RTF File). When you do this,
Arachnophilia will ask whether it should convert it into HTML format. Choose
Yes and you are done.
· Open Windows Explorer and drag an RTF document icon onto the Arachnophilia
program window (not onto an open document, but onto the background). In the
same way as method (1), Arachnophilia will ask whether it should convert it
into HTML format.

· For programs that do not support the RTF file format, open your source
program and Arachnophilia at the same time. Open a new, blank RTF document
in Arachnophilia (File . New File . RTF File). Move to your source program
and select the block of text you are interested in. Drag this block over to
the open RTF document window in Arachnophilia, and drop it. Then select the
menu option Tools . Convert RTF to HTML.
· Use the Windows clipboard and proceed as in method (3) above.

These methods apply to data sources such as spreadsheets and databases --
just use method 3 or 4 above if the program does not export RTF files.

Here are some suggestions to help Arachnophilia convert your document:

Always use real bulleted lists and real numbered lists, available in most
word processing programs, instead of manually numbering a list of items. If
you use the real versions of these features, Arachnophilia will create the
HTML equivalent of these structures, which look great. If you simply
manually number a list, it will not look nearly as good when viewed on a
browser.

Avoid outdenting paragraphs in your document formatting -- Arachnophilia
will interpret this as an outline. Instead, if you create a real outline,
even one with multiple levels, Arachnophilia will translate it into HTML for
you.

Here are some restrictions for this automatic conversion method:

Arachnophilia will automatically import tables and outlines, but cannot
import any pictures that are included in your original document. These parts
of your document have to be imported separately, using the HTML tags that
are designed for that purpose.

Sometimes Arachnophilia will misinterpret a line with tab characters in it
as a table row. If this is not what you intended and you want to prevent
this behavior, choose Tools . Options and select Convert Tabs into Spaces.
Remember later that you made this choice, because Arachnophilia won't create
tables until the Convert Tabbed Lines into Tables option is enabled again.
In general, avoid the use of tabs, because this character is used in the RTF
document format to identify table rows, and Arachnophilia relies on them for
this purpose.

Be sure to review the Arachnophilia File Import methods for more information
on these techniques.

- Original Message -
From: Cami [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 04, 2001 4:08 AM
Subject: [PHP-DB] Transforming doc files into html


 Hi there,
 Does anybody know if is any way in which when you upload a word document
 file you can parse it and transform
 it into an html file?
 Is this possible ? Has anybody tried it? I know I can transform it into a
 txt file but wouldn't it be even better if we can do an html file?

 Thanks,
 Cami


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Submitting a form with the Enter button

2001-07-27 Thread Ken Sommers

IF I click this submit button:

input type=submit name=submit_key value=send_key

then (isset($submit_key) )  is TRUE


IF i press  my ENTER button instead of click it

then (isset($submit_key) ) is FALSE..

is this normal behavior?

Ken


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] anyone use the PHP dl() functiion?

2001-07-17 Thread Ken Sommers

Hello,
does anyone use the PHP dl() function?
to dynamically load modules at run time?
how does it work for you?

Ken


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] FOPEN () communication

2001-07-16 Thread Ken Sommers

PHP manual says:
fopen
fopen -- Opens file or URL
Description
int fopen (string filename, string mode [, int use_include_path])

If filename begins with http://; (not case sensitive), an HTTP 1.0
connection is opened to the specified server, the page is requested using
the HTTP GET method, and a file pointer is returned to the beginning of the
body of the response.


consider this use of Fopen():

$movie_site = fopen(http://www.site.com/MovieResponder.php?star=; .
urlencode($star) . year= . urlencode($year), r);
$movie_info = fread($movie_site, 10240);
fclose($movie_site);
---
http://www.site.com/MovieResponder.php performs a query on it;s own database
with $star and $year


how does http://www.site.com/MovieResponder.php get the query result in the
body of the response?

a simple

html
body
echo ($result);
/body

??

how does this stuff communicate?

where's a tutorial or some docs on it?

Ken



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] the body of the response

2001-07-16 Thread Ken Sommers

PHP manual says:
fopen
fopen -- Opens file or URL
Description
int fopen (string filename, string mode [, int use_include_path])

If filename begins with http://; (not case sensitive), an HTTP 1.0
connection is opened to the specified server, the page is requested using
the HTTP GET method, and a file pointer is returned to the beginning of the
body of the response.

can someone explain the clause:

and a file pointer is returned to the beginning of the
body of the response.

can someone explain and describe what this body  is?

can query results be put in this 'body',,if so how?

thanks,

Ken


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] the body of the response

2001-07-16 Thread Ken Sommers

thanks for response,

I am curious, how does the http://www.site.com/MovieResponder.php script get
the data in the body?.
what is the mechanism involved?
is this body the
body
/php echo $data;?
/body

of an html page?

is this the body we are talking about or some other body?


what is the secret code involved?
thanks again,

Ken

- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Monday, July 16, 2001 12:53 PM
Subject: RE: [PHP-DB] the body of the response




 The body of the response is the data that the
 http://www.site.com/MovieResponder.php script would produce.

 The fread() call that I meantioned before would read -all- of this data
 into a variable.


 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 11:52 AM
 To: PHP DB Mailing List
 Subject: [PHP-DB] the body of the response


 PHP manual says:
 fopen
 fopen -- Opens file or URL
 Description
 int fopen (string filename, string mode [, int use_include_path])

 If filename begins with http://; (not case sensitive), an HTTP 1.0
 connection is opened to the specified server, the page is requested
 using the HTTP GET method, and a file pointer is returned to the
 beginning of the body of the response.
 
 can someone explain the clause:

 and a file pointer is returned to the beginning of the
 body of the response.

 can someone explain and describe what this body  is?

 can query results be put in this 'body',,if so how?

 thanks,

 Ken


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] the body of the response

2001-07-16 Thread Ken Sommers

MR.Loff,
I see the concept.. but i still don;t see the secret code.
for this process:

And you created MovieResponder.php to give you this response:

Movie One 1977
Movie Two 1977
Movie Three 1977

how does it GIVE..is there a php function called GIVE()?
where does the Give() function Give it's data?

does it have to give in here?

body ? php Give() ? /body

what gives?


what is the secret code?
I looked up Give()  in the php manual..no such function.as give().

what is the secret code?

---
MovieResponder.php can generate -anything- you want... HTML code, a
 serialize()d array, or anything else...

suppose I Need MovieResponder.php to generate  an  array..
how do I generate it ?
what does generate mean in PHP?

does it mean an assignment statement? does an assignment statement GENERATE
an array?
or maybe an Echo statement to the body GENERATEs an array?
what is the secret code Generate() is not a valid php function either.

what is the secret code,?,and why is it secret?

Ken






Ken




- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Monday, July 16, 2001 1:34 PM
Subject: RE: [PHP-DB] the body of the response



 MovieResponder.php can generate -anything- you want... HTML code, a
 serialize()d array, or anything else...

 By using fopen() to call http://www.wherever.com/MovieResponder.php and
 fread() to grab the data to a local variable, you're calling the
 MovieResponder.php script as if you are simply accessing it through a
 web browser!

 Whatever MovieResponder.php outputs-- HTML, etc... Will be saved in your
 local variable for manipulation!


 Here's an example... Say your MovieResponder.php file takes the $actor
 and $year variables, and queries MySQL, then returns a list of movies.

 ... Let's say you called your script through your web browser as
 http://www.wherever.com/MovieResponder.php?actor=Somebodyyear=1977
 And you created MovieResponder.php to give you this response:

 Movie One 1977
 Movie Two 1977
 Movie Three 1977

 ... If your local PHP script looks like this:

 $file = fopen(http://www.wherever.com/MovieResponder.php?actor=; .
 urlencode($actor) . year= . urlencode($year), r);
 $data = fread($file, 10240);
 fclose($file);

 ... Then if you called your local script with $actor = Somebody and
 $year = 1977, when it is called, your $data variable would contain:

 Movie One 1977
 Movie Two 1977
 Movie Three 1977

 Easy as that!  It's a very simple concept.


 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 4:04 PM
 To: Matthew Loff; 'PHP DB Mailing List'
 Subject: Re: [PHP-DB] the body of the response


 thanks for response,

 I am curious, how does the http://www.site.com/MovieResponder.php script
 get the data in the body?. what is the mechanism involved? is this
 body the body /php echo $data;? /body

 of an html page?

 is this the body we are talking about or some other body?


 what is the secret code involved?
 thanks again,

 Ken

 - Original Message -
 From: Matthew Loff [EMAIL PROTECTED]
 To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing
 List' [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 12:53 PM
 Subject: RE: [PHP-DB] the body of the response


 
 
  The body of the response is the data that the
  http://www.site.com/MovieResponder.php script would produce.
 
  The fread() call that I meantioned before would read -all- of this
  data into a variable.
 
 
  -Original Message-
  From: Ken Sommers [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 16, 2001 11:52 AM
  To: PHP DB Mailing List
  Subject: [PHP-DB] the body of the response
 
 
  PHP manual says:
  fopen
  fopen -- Opens file or URL
  Description
  int fopen (string filename, string mode [, int use_include_path])
 
  If filename begins with http://; (not case sensitive), an HTTP 1.0
  connection is opened to the specified server, the page is requested
  using the HTTP GET method, and a file pointer is returned to the
  beginning of the body of the response.
  
  can someone explain the clause:
 
  and a file pointer is returned to the beginning of the
  body of the response.
 
  can someone explain and describe what this body  is?
 
  can query results be put in this 'body',,if so how?
 
  thanks,
 
  Ken
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
  [EMAIL PROTECTED]
 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] the body of the response

2001-07-16 Thread Ken Sommers

I looked up Output();
could not find output() function in PHP.

what is the secret code to output?

Ken
- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Monday, July 16, 2001 2:05 PM
Subject: RE: [PHP-DB] the body of the response



 Ken--

 There's no secret code.  By giving the response, I mean the
 MovieResponder.php outputs that data... This is the most elementary of
 PHP features... See:

 http://www.php.net/manual/en/function.echo.php
 http://www.php.net/manual/en/function.print.php

 By giving the data to your script, I am saying that the
 MovieResponder.php script outputs the data (see above) thinking that a
 -web browser- is at the other end... Your script takes that data, and
 stores it to a variable by calling fread() (which I explained before).

 You may want to start from the beginning, and get a good grasp as how
 exactly the PHP language works:

 http://www.php.net/manual/en/langref.php

 Then experiment!  Create a PHP script that reads the data from a URL,
 for example:

 ?php

 $url = fopen(http://snaps.php.net/;, r);
 $page = fread($url, 10240);
 fclose($url);

 echo $page;

 ?

 The $page variable will contain the output of http://snaps.php.net/.

 Good luck!
 --Matt


 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 4:50 PM
 To: Matthew Loff; 'PHP DB Mailing List'
 Subject: Re: [PHP-DB] the body of the response


 MR.Loff,
 I see the concept.. but i still don;t see the secret code.
 for this process:

 And you created MovieResponder.php to give you this response:

 Movie One 1977
 Movie Two 1977
 Movie Three 1977

 how does it GIVE..is there a php function called GIVE()? where does
 the Give() function Give it's data?

 does it have to give in here?

 body ? php Give() ? /body

 what gives?


 what is the secret code?
 I looked up Give()  in the php manual..no such function.as give().

 what is the secret code?

 ---
 MovieResponder.php can generate -anything- you want... HTML code, a
 serialize()d array, or anything else...

 suppose I Need MovieResponder.php to generate  an  array..
 how do I generate it ?
 what does generate mean in PHP?

 does it mean an assignment statement? does an assignment statement
 GENERATE an array? or maybe an Echo statement to the body GENERATEs an
 array? what is the secret code Generate() is not a valid php function
 either.

 what is the secret code,?,and why is it secret?

 Ken






 Ken




 - Original Message -
 From: Matthew Loff [EMAIL PROTECTED]
 To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing
 List' [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 1:34 PM
 Subject: RE: [PHP-DB] the body of the response


 
  MovieResponder.php can generate -anything- you want... HTML code, a
  serialize()d array, or anything else...
 
  By using fopen() to call http://www.wherever.com/MovieResponder.php
  and
  fread() to grab the data to a local variable, you're calling the
  MovieResponder.php script as if you are simply accessing it through a
  web browser!
 
  Whatever MovieResponder.php outputs-- HTML, etc... Will be saved in
  your local variable for manipulation!
 
 
  Here's an example... Say your MovieResponder.php file takes the $actor

  and $year variables, and queries MySQL, then returns a list of movies.
 
  ... Let's say you called your script through your web browser as
  http://www.wherever.com/MovieResponder.php?actor=Somebodyyear=1977
  And you created MovieResponder.php to give you this response:
 
  Movie One 1977
  Movie Two 1977
  Movie Three 1977
 
  ... If your local PHP script looks like this:
 
  $file = fopen(http://www.wherever.com/MovieResponder.php?actor=; .
  urlencode($actor) . year= . urlencode($year), r);
  $data = fread($file, 10240);
  fclose($file);
 
  ... Then if you called your local script with $actor = Somebody and
  $year = 1977, when it is called, your $data variable would contain:
 
  Movie One 1977
  Movie Two 1977
  Movie Three 1977
 
  Easy as that!  It's a very simple concept.
 
 
  -Original Message-
  From: Ken Sommers [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 16, 2001 4:04 PM
  To: Matthew Loff; 'PHP DB Mailing List'
  Subject: Re: [PHP-DB] the body of the response
 
 
  thanks for response,
 
  I am curious, how does the http://www.site.com/MovieResponder.php
  script get the data in the body?. what is the mechanism involved? is
  this body the body /php echo $data;? /body
 
  of an html page?
 
  is this the body we are talking about or some other body?
 
 
  what is the secret code involved?
  thanks again,
 
  Ken
 
  - Original Message -
  From: Matthew Loff [EMAIL PROTECTED]
  To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing
  List' [EMAIL PROTECTED]
  Sent: Monday, July 16, 2001 12:53 PM
  Subject: RE: [PHP-DB] the body of the response
 
 
  
  
   The body of the response is the data that the
   http

[PHP-DB] remote database exchange

2001-07-16 Thread Ken Sommers

Is it possible to exchange data on remote databases in PHP mysql?

Suppose I had a MUSIC database that you wanted your site visitors to be able
to query,and it was OK with me because you had a MOVIE database that I
wanted MY site visitors to be able to query,

Could we swing this?

what is the name of this process?
remote process serving?
remote database access?
relay exchange process server?

IF it exists,,where are all the tutorials and docs on it?


Ken


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: the body of the response

2001-07-16 Thread Ken Sommers

thanks CC,
are you saying that i can grab the output of your echo() statements in YOUR
PHP script by Fopen()ing your URL
in MY script and then Fread()ing that resulting file pointer?
IF so,, is this done much? or are there easier more stable less error-prone
ways to access remote databases?

Suppose I had a MUSIC database that you wanted your site visitors to be able
to query,and it was OK with me because you had a MOVIE database that i
wanted MY site visitors to be able to query,
would we set it up this way?

ken

- Original Message -
From: CC Zona [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 2:16 PM
Subject: [PHP-DB] Re: the body of the response


 In article 008101c10e0f$379207e0$c844500c@zeospantera,
  [EMAIL PROTECTED] (Ken Sommers) wrote:

  PHP manual says:
  fopen
  fopen -- Opens file or URL
  Description
  int fopen (string filename, string mode [, int use_include_path])
 
  If filename begins with http://; (not case sensitive), an HTTP 1.0
  connection is opened to the specified server, the page is requested
using
  the HTTP GET method, and a file pointer is returned to the beginning of
the
  body of the response.
  
  can someone explain the clause:
 
  and a file pointer is returned to the beginning of the
  body of the response.
 
  can someone explain and describe what this body  is?

 Presumably that's what RFC 2616 refers to as the message body, the part
 of the response that follows the headers.  Translated: what you get with
 fopen() is what you'd get by fetching the same URL with a browser and then
 viewing source.

 BTW, fsockopen() can be used to get both headers (Content-type,
 Content-length, Expires, Location, etc.) and body
 (HTML/HTML or whatever).

 --
 CC

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] remote database exchange

2001-07-16 Thread Ken Sommers

Suppose I Need to get Vendor prices from a very large remote (Oracle) price
list .
They probably don't have PHP installed.
What are my options?

Ken

- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Monday, July 16, 2001 3:31 PM
Subject: RE: [PHP-DB] remote database exchange




 The mysql_connect() function accepts a host name, which can be the
 internet address of another machine!  However-- the MySQL database on
 that machine has to be set up to allow outside connections for whatever
 particular username/password you are using!

 Please see these pages to answer your questions:
 http://www.mysql.com/doc/A/d/Adding_users.html--  MySQL
 username/password configuration
 http://www.php.net/manual/en/ref.mysql.php---MySQL functions in
 PHP

 The PHP page has an example on that page that will show you -exactly-
 how to do it.

 --Matt


 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 5:53 PM
 To: PHP DB Mailing List
 Subject: [PHP-DB] remote database exchange


 Is it possible to exchange data on remote databases in PHP mysql?

 Suppose I had a MUSIC database that you wanted your site visitors to be
 able to query,and it was OK with me because you had a MOVIE database
 that I wanted MY site visitors to be able to query,

 Could we swing this?

 what is the name of this process?
 remote process serving?
 remote database access?
 relay exchange process server?

 IF it exists,,where are all the tutorials and docs on it?


 Ken


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] remote database exchange

2001-07-16 Thread Ken Sommers

Great,
thanks for a complete answer
 I love it..

I ran
mysql show variables;
to see if my host server has Oracle support,,
I don't see anything about Oracle  or any  other DBMS,,
any way to tell without asking them?

ken
- Original Message -
From: CC Zona [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 4:33 PM
Subject: Re: [PHP-DB] remote database exchange


 In article 012601c10e4a$6c7a2ec0$b943500c@zeospantera,
  [EMAIL PROTECTED] (Ken Sommers) wrote:

  Suppose I Need to get Vendor prices from a very large remote (Oracle)
price
  list .
  They probably don't have PHP installed.

 If...

 -you have PHP installed,
 -AND you have Oracle support compiled in to that install,
 -AND you have connection info (username/password/hostname) for an account
 on that Oracle system that has been granted access to vendor prices,
 -AND you know how to use PHP's Oracle functions,
 -AND you know how to query an Oracle database

 ...then you're set.  Whether they have PHP installed or not is irrelevant.

 --
 CC

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?

2001-07-16 Thread Ken Sommers

Any one use or know of a php/mysql/unix-Linux hosting company with 
 PHP database support compiled with all the major DBMS's such as:

 mSQL
MySQL
PostgreSQL
Sybase
Oracle
Informix
MS-SQL
Other ODBC Database

I will need to use some or all of these DBMS PHP functions
for remote access.

thanks,,
Ken


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?

2001-07-16 Thread Ken Sommers

Thanks for the HOT tip..on the dl() function.

should the dl() function work an ANY PHP4 host?
or do restrictons apply?


would I put the dl()  at the top of  EVERY  script page In which I Need the
functionality..?
or just load it once per session and check and see if it';s already loaded
before I Load it,each time because it might already be loaded,,
like I Used to do when I used to get loaded?
the documentation is kinda skimpy.
here's what it says:
---
dl
(PHP 3, PHP 4 = 4.0b1)

dl -- load a PHP extension at runtime
Description

int dl (string library)


Loads the PHP extension defined in library. See also the extension_dir
configuration directive.
---

thanks,

Ken

- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Monday, July 16, 2001 6:01 PM
Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?



 Even if a PHP host doesn't have all the DBMS extensions you need, you
 could compile them and load them yourself with dl()

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

 I thought you might want to keep that in mind, in case one particular
 host has a great price but not all the features you need...


 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 8:53 PM
 To: PHP DB Mailing List
 Subject: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?


 Any one use or know of a php/mysql/unix-Linux hosting company with
  PHP database support compiled with all the major DBMS's such as:

  mSQL
 MySQL
 PostgreSQL
 Sybase
 Oracle
 Informix
 MS-SQL
 Other ODBC Database

 I will need to use some or all of these DBMS PHP functions
 for remote access.

 thanks,,
 Ken


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?

2001-07-16 Thread Ken Sommers

is this what some of them look like
is this the name that would go into the dl() function??

print_r (get_loaded_extensions());
 will print a list like:
Array
(
[0] = xml
[1] = wddx
[2] = standard
   [3] = session
   [4] = posix
   [5] = pgsql
   [6] = pcre
   [7] = gd
   [8] = ftp
   [9] = db
   [10] = Calendar
   [11] = bcmath
)

so would

dl(posix);
dl(pgsql);

work?

Ken
- Original Message -
From: Ken Sommers [EMAIL PROTECTED]
To: Matthew Loff [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Monday, July 16, 2001 7:11 PM
Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?


 Help.
 I just spent the last hour looking for the
 the PHP extension library to see what the
 the PHP extension defined in library is to put in
 dl (string library);
 to load an extension at run time.
 has someone seen the library door?
 I Keep missing it?

 Ken


 - Original Message -
 From: Matthew Loff [EMAIL PROTECTED]
 To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
 [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 6:37 PM
 Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
support?


 
 
  I'm not sure if dl() can be restricted in php.ini-- Someone else will
  have to comment on that...
 
  I believe you'll have to dl() on every page you create... You could
  always do the following for portability to other PHP hosts, just in case
  they have the module already compiled in:
 
  if(!extension_loaded(mysql)) dl(mysql.so);
 
  That's assuming that the mysql ext. is named mysql.so in a compiled
  state, of course.
 
 
  -Original Message-
  From: Ken Sommers [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 16, 2001 9:26 PM
  To: Matthew Loff; 'PHP DB Mailing List'
  Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
  support?
 
 
  Thanks for the HOT tip..on the dl() function.
 
  should the dl() function work an ANY PHP4 host?
  or do restrictons apply?
 
 
  would I put the dl()  at the top of  EVERY  script page In which I Need
  the functionality..? or just load it once per session and check and
  see if it';s already loaded before I Load it,each time because it might
  already be loaded,, like I Used to do when I used to get loaded? the
  documentation is kinda skimpy. here's what it says:
  ---
  dl
  (PHP 3, PHP 4 = 4.0b1)
 
  dl -- load a PHP extension at runtime
  Description
 
  int dl (string library)
 
 
  Loads the PHP extension defined in library. See also the extension_dir
  configuration directive.
  ---
 
  thanks,
 
  Ken
 
  - Original Message -
  From: Matthew Loff [EMAIL PROTECTED]
  To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
  [EMAIL PROTECTED]
  Sent: Monday, July 16, 2001 6:01 PM
  Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
  support?
 
 
  
   Even if a PHP host doesn't have all the DBMS extensions you need, you
   could compile them and load them yourself with dl()
  
   http://www.php.net/manual/en/function.dl.php
  
   I thought you might want to keep that in mind, in case one particular
   host has a great price but not all the features you need...
  
  
   -Original Message-
   From: Ken Sommers [mailto:[EMAIL PROTECTED]]
   Sent: Monday, July 16, 2001 8:53 PM
   To: PHP DB Mailing List
   Subject: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
   support?
  
  
   Any one use or know of a php/mysql/unix-Linux hosting company with
   PHP database support compiled with all the major DBMS's such as:
  
mSQL
   MySQL
   PostgreSQL
   Sybase
   Oracle
   Informix
   MS-SQL
   Other ODBC Database
  
   I will need to use some or all of these DBMS PHP functions for remote
   access.
  
   thanks,,
   Ken
  
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
   [EMAIL PROTECTED]
  
  
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?

2001-07-16 Thread Ken Sommers

thanks Mat,
I found this FAQ:

When I try to connect to mysql from php I get this error: Call to
unsupported or undefined function mysql_connect();
Updated: 2001-06-01
Either you miss mysql support in the php module or you need to load mysql
dynamicly in your scripts by inserting:

dl(mysql.so); (on unix)
dl(mysql.dll); (on windows);

in the top of all the scripts that use mysql.
--- end of FAQ

I am hoping it is that simple.
the dl() does it all..
please say  it does..:)

ken



- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Monday, July 16, 2001 8:13 PM
Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?



 The ext/ directory under the PHP source tree contains the source to the
 extensions...

 You're right about the dl() syntax, except the parameter would need to
 be in quotes, and dl() requires the full filename of the extension.

 For xml, it would be:

 dl(xml.so);

 But compiling those shared modules is another story-- I'm not quite sure
 how to.  Can anyone else help?

 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 10:18 PM
 To: Ken Sommers; Matthew Loff; 'PHP DB Mailing List'
 Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
 support?


 is this what some of them look like
 is this the name that would go into the dl() function??

 print_r (get_loaded_extensions());
  will print a list like:
 Array
 (
 [0] = xml
 [1] = wddx
 [2] = standard
[3] = session
[4] = posix
[5] = pgsql
[6] = pcre
[7] = gd
[8] = ftp
[9] = db
[10] = Calendar
[11] = bcmath
 )

 so would

 dl(posix);
 dl(pgsql);

 work?

 Ken
 - Original Message -
 From: Ken Sommers [EMAIL PROTECTED]
 To: Matthew Loff [EMAIL PROTECTED]; 'PHP DB Mailing List'
 [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 7:11 PM
 Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
 support?


  Help.
  I just spent the last hour looking for the
  the PHP extension library to see what the
  the PHP extension defined in library is to put in
  dl (string library);
  to load an extension at run time.
  has someone seen the library door?
  I Keep missing it?
 
  Ken
 
 
  - Original Message -
  From: Matthew Loff [EMAIL PROTECTED]
  To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
  [EMAIL PROTECTED]
  Sent: Monday, July 16, 2001 6:37 PM
  Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
 support?
 
 
  
  
   I'm not sure if dl() can be restricted in php.ini-- Someone else
   will have to comment on that...
  
   I believe you'll have to dl() on every page you create... You could
   always do the following for portability to other PHP hosts, just in
   case they have the module already compiled in:
  
   if(!extension_loaded(mysql)) dl(mysql.so);
  
   That's assuming that the mysql ext. is named mysql.so in a
   compiled state, of course.
  
  
   -Original Message-
   From: Ken Sommers [mailto:[EMAIL PROTECTED]]
   Sent: Monday, July 16, 2001 9:26 PM
   To: Matthew Loff; 'PHP DB Mailing List'
   Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
   support?
  
  
   Thanks for the HOT tip..on the dl() function.
  
   should the dl() function work an ANY PHP4 host?
   or do restrictons apply?
  
  
   would I put the dl()  at the top of  EVERY  script page In which I
   Need the functionality..? or just load it once per session and
   check and see if it';s already loaded before I Load it,each time
   because it might already be loaded,, like I Used to do when I used
   to get loaded? the documentation is kinda skimpy. here's what it
   says:
   ---
   dl
   (PHP 3, PHP 4 = 4.0b1)
  
   dl -- load a PHP extension at runtime
   Description
  
   int dl (string library)
  
  
   Loads the PHP extension defined in library. See also the
   extension_dir configuration directive.
   ---
  
   thanks,
  
   Ken
  
   - Original Message -
   From: Matthew Loff [EMAIL PROTECTED]
   To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing
   List' [EMAIL PROTECTED]
   Sent: Monday, July 16, 2001 6:01 PM
   Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
   support?
  
  
   
Even if a PHP host doesn't have all the DBMS extensions you need,
you could compile them and load them yourself with dl()
   
http://www.php.net/manual/en/function.dl.php
   
I thought you might want to keep that in mind, in case one
particular host has a great price but not all the features you
need...
   
   
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 8:53 PM
To: PHP DB Mailing List
Subject: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
support?
   
   
Any one use or know of a php/mysql/unix-Linux hosting company with

PHP

Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?

2001-07-16 Thread Ken Sommers

I'm hoping the dl(mysql.so); compiles it for you.
I found this FAQ: http://www.alt-php-faq.org/#id7

When I try to connect to mysql from php I get this error: Call to
unsupported or undefined function mysql_connect();
Updated: 2001-06-01
Either you miss mysql support in the php module or you need to load mysql
dynamicly in your scripts by inserting:

dl(mysql.so); (on unix)
dl(mysql.dll); (on windows);

in the top of all the scripts that use mysql.
--- end of FAQ

I hope it is that simple..

Ken

- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Monday, July 16, 2001 8:53 PM
Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?



 That's all there is to it, I'm just not sure how to compile the mysql.so
 file!  I looked through the PHP source tree, but the makefiles don't
 seem to be able to build the shared libs.

 Maybe it, along with others, can be downloaded from somewhere.


 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 11:45 PM
 To: Matthew Loff; 'PHP DB Mailing List'
 Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
 support?


 thanks Mat,
 I found this FAQ:

 When I try to connect to mysql from php I get this error: Call to
 unsupported or undefined function mysql_connect();
 Updated: 2001-06-01
 Either you miss mysql support in the php module or you need to load
 mysql dynamicly in your scripts by inserting:

 dl(mysql.so); (on unix)
 dl(mysql.dll); (on windows);

 in the top of all the scripts that use mysql.
 --- end of FAQ

 I am hoping it is that simple.
 the dl() does it all..
 please say  it does..:)

 ken



 - Original Message -
 From: Matthew Loff [EMAIL PROTECTED]
 To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing
 List' [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 8:13 PM
 Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
 support?


 
  The ext/ directory under the PHP source tree contains the source to
  the extensions...
 
  You're right about the dl() syntax, except the parameter would need to

  be in quotes, and dl() requires the full filename of the extension.
 
  For xml, it would be:
 
  dl(xml.so);
 
  But compiling those shared modules is another story-- I'm not quite
  sure how to.  Can anyone else help?
 
  -Original Message-
  From: Ken Sommers [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 16, 2001 10:18 PM
  To: Ken Sommers; Matthew Loff; 'PHP DB Mailing List'
  Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
  support?
 
 
  is this what some of them look like
  is this the name that would go into the dl() function??
 
  print_r (get_loaded_extensions());
   will print a list like:
  Array
  (
  [0] = xml
  [1] = wddx
  [2] = standard
 [3] = session
 [4] = posix
 [5] = pgsql
 [6] = pcre
 [7] = gd
 [8] = ftp
 [9] = db
 [10] = Calendar
 [11] = bcmath
  )
 
  so would
 
  dl(posix);
  dl(pgsql);
 
  work?
 
  Ken
  - Original Message -
  From: Ken Sommers [EMAIL PROTECTED]
  To: Matthew Loff [EMAIL PROTECTED]; 'PHP DB Mailing List'
  [EMAIL PROTECTED]
  Sent: Monday, July 16, 2001 7:11 PM
  Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
  support?
 
 
   Help.
   I just spent the last hour looking for the
   the PHP extension library to see what the
   the PHP extension defined in library is to put in
   dl (string library);
   to load an extension at run time.
   has someone seen the library door?
   I Keep missing it?
  
   Ken
  
  
   - Original Message -
   From: Matthew Loff [EMAIL PROTECTED]
   To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing
   List' [EMAIL PROTECTED]
   Sent: Monday, July 16, 2001 6:37 PM
   Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
  support?
  
  
   
   
I'm not sure if dl() can be restricted in php.ini-- Someone else
will have to comment on that...
   
I believe you'll have to dl() on every page you create... You
could always do the following for portability to other PHP hosts,
just in case they have the module already compiled in:
   
if(!extension_loaded(mysql)) dl(mysql.so);
   
That's assuming that the mysql ext. is named mysql.so in a
compiled state, of course.
   
   
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 9:26 PM
To: Matthew Loff; 'PHP DB Mailing List'
Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
support?
   
   
Thanks for the HOT tip..on the dl() function.
   
should the dl() function work an ANY PHP4 host?
or do restrictons apply?
   
   
would I put the dl()  at the top of  EVERY  script page In which I

Need the functionality..? or just load it once per session and
check and see if it';s already loaded before

Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?

2001-07-16 Thread Ken Sommers

I think and hope it works like this
the .so(unix) or .dll(win32) file is already a binary compiled executable
(I know for a fact that the Win 32 dll's ARE) I looked at one with my file
viewer quick view plus
I have php4/mysql/apache on my local host computer (Win95) I am typing into
now.
so the extension files are already compiled.(Win 32 definalty
ARE.executable,,assuming Unix .so files are the same)
they just have to be LINKED to the PHP binary by a ;linker like DL()
so then PHP will ACT like it has been compiled with the extension..
Hence dynamically linking it.

on win32 they are located (by default) in the C:/php/extensions dir
under Unix they must be somewhere.
phpinfo() has an entry for the php extensions dir
my remote server shows:
extension_dir  ./

under the heading Configuration PHP Core in phpinfo()

and the FAQ I showed you sort of substantiates that hypothesis..

Here it is again:

I found this FAQ: http://www.alt-php-faq.org/#id7

When I try to connect to mysql from php I get this error: Call to
unsupported or undefined function mysql_connect();
Updated: 2001-06-01
Either you miss mysql support in the php module or you need to load mysql
dynamicly in your scripts by inserting:

dl(mysql.so); (on unix)
dl(mysql.dll); (on windows);

in the top of all the scripts that use mysql.
--- end of FAQ

notice the FAQ master tells the troubled soul to just dl() it ?

no disturbing talk of compiling the mysql.so file first...

Has anyone used the dl() function b4???

tell us how it works..

Ken






- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Monday, July 16, 2001 9:18 PM
Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?



 dl(mysql.so);  won't compile it... You need to provide the mysql.so
 file for it to link to, but I don't know where to obtain it...  :(


 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 17, 2001 12:12 AM
 To: Matthew Loff; 'PHP DB Mailing List'
 Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
 support?


 I'm hoping the dl(mysql.so); compiles it for you.
 I found this FAQ: http://www.alt-php-faq.org/#id7

 When I try to connect to mysql from php I get this error: Call to
 unsupported or undefined function mysql_connect();
 Updated: 2001-06-01
 Either you miss mysql support in the php module or you need to load
 mysql dynamicly in your scripts by inserting:

 dl(mysql.so); (on unix)
 dl(mysql.dll); (on windows);

 in the top of all the scripts that use mysql.
 --- end of FAQ

 I hope it is that simple..

 Ken

 - Original Message -
 From: Matthew Loff [EMAIL PROTECTED]
 To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing
 List' [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 8:53 PM
 Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
 support?


 
  That's all there is to it, I'm just not sure how to compile the
  mysql.so file!  I looked through the PHP source tree, but the
  makefiles don't seem to be able to build the shared libs.
 
  Maybe it, along with others, can be downloaded from somewhere.
 
 
  -Original Message-
  From: Ken Sommers [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 16, 2001 11:45 PM
  To: Matthew Loff; 'PHP DB Mailing List'
  Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
  support?
 
 
  thanks Mat,
  I found this FAQ:
 
  When I try to connect to mysql from php I get this error: Call to
  unsupported or undefined function mysql_connect();
  Updated: 2001-06-01
  Either you miss mysql support in the php module or you need to load
  mysql dynamicly in your scripts by inserting:
 
  dl(mysql.so); (on unix)
  dl(mysql.dll); (on windows);
 
  in the top of all the scripts that use mysql.
  --- end of FAQ
 
  I am hoping it is that simple.
  the dl() does it all..
  please say  it does..:)
 
  ken
 
 
 
  - Original Message -
  From: Matthew Loff [EMAIL PROTECTED]
  To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing
  List' [EMAIL PROTECTED]
  Sent: Monday, July 16, 2001 8:13 PM
  Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
  support?
 
 
  
   The ext/ directory under the PHP source tree contains the source to
   the extensions...
  
   You're right about the dl() syntax, except the parameter would need
   to
 
   be in quotes, and dl() requires the full filename of the extension.
  
   For xml, it would be:
  
   dl(xml.so);
  
   But compiling those shared modules is another story-- I'm not quite
   sure how to.  Can anyone else help?
  
   -Original Message-
   From: Ken Sommers [mailto:[EMAIL PROTECTED]]
   Sent: Monday, July 16, 2001 10:18 PM
   To: Ken Sommers; Matthew Loff; 'PHP DB Mailing List'
   Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
   support?
  
  
   is this what some of them look like
   is this the name that would go

Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?

2001-07-16 Thread Ken Sommers

Do you mean the hosting company would have compiled PHP with all the
extenions available at compile time?
I have looked at two different hosting company's phpinfo()

the only dbms they  build PHP with is mysql..or its' already built in
I think the resoning is: IF you want other dbms PHP functions,,just dl() it
.

Ken

- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Monday, July 16, 2001 9:56 PM
Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?




 You're correct that .so files are like Windows' .dll files...  However,
 if the library were already available on the PHP host, it most likely
 would already be included in the PHP binary...

 Perhaps (as you suggested) you need to find binary distributions of each
 individual library (e.g. mysql.so) that you need...  I'd check for .rpm
 files...


 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 17, 2001 12:43 AM
 To: Matthew Loff; 'PHP DB Mailing List'
 Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
 support?


 I think and hope it works like this
 the .so(unix) or .dll(win32) file is already a binary compiled
 executable (I know for a fact that the Win 32 dll's ARE) I looked at one
 with my file viewer quick view plus I have php4/mysql/apache on my
 local host computer (Win95) I am typing into now. so the extension files
 are already compiled.(Win 32 definalty ARE.executable,,assuming Unix .so
 files are the same) they just have to be LINKED to the PHP binary by a
 ;linker like DL() so then PHP will ACT like it has been compiled with
 the extension.. Hence dynamically linking it.

 on win32 they are located (by default) in the C:/php/extensions dir
 under Unix they must be somewhere.
 phpinfo() has an entry for the php extensions dir
 my remote server shows:
 extension_dir  ./

 under the heading Configuration PHP Core in phpinfo()

 and the FAQ I showed you sort of substantiates that hypothesis..

 Here it is again:

 I found this FAQ: http://www.alt-php-faq.org/#id7

 When I try to connect to mysql from php I get this error: Call to
 unsupported or undefined function mysql_connect();
 Updated: 2001-06-01
 Either you miss mysql support in the php module or you need to load
 mysql dynamicly in your scripts by inserting:

 dl(mysql.so); (on unix)
 dl(mysql.dll); (on windows);

 in the top of all the scripts that use mysql.
 --- end of FAQ

 notice the FAQ master tells the troubled soul to just dl() it ?

 no disturbing talk of compiling the mysql.so file first...

 Has anyone used the dl() function b4???

 tell us how it works..

 Ken






 - Original Message -
 From: Matthew Loff [EMAIL PROTECTED]
 To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing
 List' [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 9:18 PM
 Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
 support?


 
  dl(mysql.so);  won't compile it... You need to provide the
  mysql.so file for it to link to, but I don't know where to obtain
  it...  :(
 
 
  -Original Message-
  From: Ken Sommers [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 17, 2001 12:12 AM
  To: Matthew Loff; 'PHP DB Mailing List'
  Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
  support?
 
 
  I'm hoping the dl(mysql.so); compiles it for you.
  I found this FAQ: http://www.alt-php-faq.org/#id7
 
  When I try to connect to mysql from php I get this error: Call to
  unsupported or undefined function mysql_connect();
  Updated: 2001-06-01
  Either you miss mysql support in the php module or you need to load
  mysql dynamicly in your scripts by inserting:
 
  dl(mysql.so); (on unix)
  dl(mysql.dll); (on windows);
 
  in the top of all the scripts that use mysql.
  --- end of FAQ
 
  I hope it is that simple..
 
  Ken
 
  - Original Message -
  From: Matthew Loff [EMAIL PROTECTED]
  To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing
  List' [EMAIL PROTECTED]
  Sent: Monday, July 16, 2001 8:53 PM
  Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
  support?
 
 
  
   That's all there is to it, I'm just not sure how to compile the
   mysql.so file!  I looked through the PHP source tree, but the
   makefiles don't seem to be able to build the shared libs.
  
   Maybe it, along with others, can be downloaded from somewhere.
  
  
   -Original Message-
   From: Ken Sommers [mailto:[EMAIL PROTECTED]]
   Sent: Monday, July 16, 2001 11:45 PM
   To: Matthew Loff; 'PHP DB Mailing List'
   Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
   support?
  
  
   thanks Mat,
   I found this FAQ:
  
   When I try to connect to mysql from php I get this error: Call to
   unsupported or undefined function mysql_connect();
   Updated: 2001-06-01
   Either you miss mysql support in the php module or you need to load
   mysql dynamicly in your

[PHP-DB] relay response transactions between PHP scripts on different servers

2001-07-15 Thread Ken Sommers

Hello,
suppose you have a MOVIES table in your database on your server at your
hosting company.
Suppose I want some MOVIE info from your database..the titles of all the
Robert Deniro movies released in the 1980's.
Can I get the info and relay it back to the user on MY site?

Would it be something like this?:

Suppose I have a php page on MY web site called MovieInfo.php

MovieInfo.php creates a sql command string from info provided by the user at
MY site.

something like $sql= select titles,dates from movies where star = 'Robert
Deniro' and decade = '1980'

assume correct syntax.

Suppose you have a PHp script on your site called MovieResponder.php
that is designed to run the query and send the result back to MY script.

The php page on MY web site called MovieInfo.php has something like this
form:

FORM method=post
action=https://www.yourserver.com/gateway/MovieResponder.php;
INPUT TYPE=hidden NAME=x_ADC_URL
VALUE=https://www.myserver.com/MovieInfo.php;
INPUT TYPE=hidden NAME=query VALUE=$sql
INPUT TYPE=submit
/FORM

etc? etc?

how could it work?

Ken


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] relay response transactions between PHP scripts on different servers

2001-07-15 Thread Ken Sommers

Here's the part that confuses me:
How does MovieResponder.php on your site get the results back to my site
and back to the browser/user who is visiting my site..?


ken

- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List'
[EMAIL PROTECTED]
Sent: Sunday, July 15, 2001 9:37 PM
Subject: RE: [PHP-DB] relay response transactions between PHP scripts on
different servers



 Ken--

 If you have access to that server with the SQL database... Then instead
 of creating an additional PHP script on the SQL server... Could you
 simply add a username/password that was allowed to access that
 particular database (read-only, of course) remotely?

 If that isn't an option, here's an idea:

 Transmit the $star and $decade variables to the MovieResponder.php
 (don't pass the SQL query directly-- that's a bad idea!)... Have the
 MovieResponder.php execute the SQL query, retrieve all results into an
 array, and serialize() the array, then pass the serialized data back to
 MovieInfo.php.

 I'm sure others will have other suggestions, and there are probably
 better ways to do it than this.

 Good luck!


 -Original Message-
 From: Ken Sommers [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 12:22 AM
 To: PHP DB Mailing List
 Subject: [PHP-DB] relay response transactions between PHP scripts on
 different servers


 Hello,
 suppose you have a MOVIES table in your database on your server at your
 hosting company. Suppose I want some MOVIE info from your database..the
 titles of all the Robert Deniro movies released in the 1980's. Can I get
 the info and relay it back to the user on MY site?

 Would it be something like this?:

 Suppose I have a php page on MY web site called MovieInfo.php

 MovieInfo.php creates a sql command string from info provided by the
 user at MY site.

 something like $sql= select titles,dates from movies where star =
 'Robert Deniro' and decade = '1980'

 assume correct syntax.

 Suppose you have a PHp script on your site called MovieResponder.php
 that is designed to run the query and send the result back to MY script.

 The php page on MY web site called MovieInfo.php has something like this
 form:

 FORM method=post
 action=https://www.yourserver.com/gateway/MovieResponder.php;
 INPUT TYPE=hidden NAME=x_ADC_URL
 VALUE=https://www.myserver.com/MovieInfo.php;
 INPUT TYPE=hidden NAME=query VALUE=$sql
 INPUT TYPE=submit
 /FORM

 etc? etc?

 how could it work?

 Ken


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] CGI or API installation?

2001-07-13 Thread Ken Sommers

Hello,
How to tell if php4 is installed as a CGI or API module) installation?
will phpinfo() tell me?
thanks ,
Ken


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Thank you everyone :-)

2001-07-12 Thread Ken Sommers

Here,,Here
I second that emotion

Ken
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 12, 2001 12:52 PM
Subject: [PHP-DB] Thank you everyone :-)


Hi there,

Thanks everyone for your help on this list - it really is a credit to the
PHP community to have you all out there helping those of us who don't know
what the heck we are doing (But who are trying to learn :-)

I appreciate it, and I am sure many others do too.

Regards

Chris Payne
www.planetoxygene.com



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Escaping

2001-07-12 Thread Ken Sommers

Please explain the dynamic link .
is that in the documentation somewhere?

Kne
- Original Message -
From: Rankin, Randy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 12, 2001 8:18 AM
Subject: [PHP-DB] Escaping 


 Hello,

 I have a table in a MySQL DB (RH Linux/Apache) with a field called
 customer_name. Some of the customer names have an ampersand in them (ie; X

 X Supply). I am performing a select statement on this table to create a
 sales summary with customer name and total sales.

 This works fine; however, I am also creating a dynamic link on the
customer
 name so that the user can click on it to get a detailed report of sales to
 that customer. This works great EXCEPT for the customers with ampersands
in
 thier names. The result of clicking on these customers indicates a No
 Records found for X where X is the letter immediately preceding the
 ampersand.

 Does anyone know how to get around this?

 TIA,

 Randy Rankin

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] cookie problems

2001-07-11 Thread Ken Sommers

HI,
my guess is is that the cookies will be killed the NEXT time you run this
script.

Ken
- Original Message -
From: Brad Lipovsky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 11:24 PM
Subject: [PHP-DB] cookie problems


 can anyone help me with this code?  i cant believe it wont work, it seems
 pretty simple!

 ?php
 setcookie (logged_in, logged in, time() - 3600);
 setcookie (logged_user_name, logged user name, time() - 3600);

 print $logged_in br;
 print $logged_user_name;
 ?

 brad



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Are PHP user-defined functions recursive?

2001-07-11 Thread Ken Sommers

Manual says:
---
Any valid PHP code may appear inside a function, even other functions and
class definitions.

In PHP 3, functions must be defined before they are referenced. No such
requirement exists in PHP 4.

PHP does not support function overloading, nor is it possible to undefine or
redefine previously-declared functions. 
-

I say:

What is function overloading?

Can a php user-defined function call itself from within itself?

thanks,
Ken




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Left Join is producing duplicate results - MySQL relational tables

2001-07-11 Thread Ken

Mike -

I'm not certain but it sounds like you might be looking for GROUP BY.  Do GROUP BY 
and then the columns that are identical in your results.

- Ken

At 09:46 PM 7/11/01 -0400, Mike Gifford wrote:
Hello,

I posted this to the general list this morning  got a couple of good leads, but they 
weren't able to actually fix the problem, so I'm posting here to the db list.

I'm making some headway on joining three MySQL tables.

However, when I run this query:

mysql_query(SELECT
   WLPbib.bibID,
  WLPbib.title,
  WLPbib.publisher,
  WLPbib.publicationDate,
  WLPaddress.city,
  WLPaddress.state,
  WLPprofile.firstName,
  WLPprofile.lastName,
  WLPprofile.organization,
  WLPcountry.languageName
  FROM  WLPbib
  LEFT JOIN WLPprofile ON WLPprofile.profileID = WLPbib.profileID
  LEFT JOIN WLPaddress ON WLPaddress.publisherID = WLPbib.publisherID
  LEFT JOIN WLPcountry ON WLPcountry.countryID = WLPaddress.countryID);

I now get results in triplicate.  ie. I'm getting three copies of the same title, 
firstName, organization, etc

I somehow suspected that this should be the result with LEFT JOIN, but I'm not sure 
how to return a query without duplication.

This is far better than what I had this morning (which was no response from the 
server).

Thanks.  I'm new to joining tables...

Someone wrote back suggesting that SELECT DISTINCT could be used to to the job.

Another person suggested that using UNIQUE(profileID) would make it look nicer.  I 
wasn't sure how to use UNIQUE with the last JOIN as it isn't directly linked to 
WLPbib..

Any suggestions would be useful.

Mike


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Left Join is producing duplicate results - MySQL relational tables

2001-07-11 Thread Ken

Mike -

In general, you should always be reading the manual first.  From the SELECT syntax at
http://www.mysql.com/doc/S/E/SELECT.html
GROUP BY must be indicated before ORDER BY.  So reverse the order of those portions.

- Ken

At 10:35 PM 7/11/01 -0400, Mike Gifford wrote:
It looked good, but it gave me an error..  Sorry
...
WLPcountry.countryID ORDER BY WLPbib.title  GROUP BY WLPbib.bibID

MySQL Error: 1064 (You have an error in your SQL syntax near 'GROUP BY WLPbib.bibID ' 
at line 10)
Please contact the webmaster and report the exact error message.
Session halted.

Ken wrote:

Mike -
I'm not certain but it sounds like you might be looking for GROUP BY.  Do GROUP BY 
and then the columns that are identical in your results.
- Ken
At 09:46 PM 7/11/01 -0400, Mike Gifford wrote:

Hello,

I posted this to the general list this morning  got a couple of good leads, but 
they weren't able to actually fix the problem, so I'm posting here to the db list.

I'm making some headway on joining three MySQL tables.

However, when I run this query:

mysql_query(SELECT
  WLPbib.bibID,
 WLPbib.title,
 WLPbib.publisher,
 WLPbib.publicationDate,
 WLPaddress.city,
 WLPaddress.state,
 WLPprofile.firstName,
 WLPprofile.lastName,
 WLPprofile.organization,
 WLPcountry.languageName
FROM  WLPbib
 LEFT JOIN WLPprofile ON WLPprofile.profileID = WLPbib.profileID
 LEFT JOIN WLPaddress ON WLPaddress.publisherID = WLPbib.publisherID
 LEFT JOIN WLPcountry ON WLPcountry.countryID = WLPaddress.countryID);

I now get results in triplicate.  ie. I'm getting three copies of the same title, 
firstName, organization, etc

I somehow suspected that this should be the result with LEFT JOIN, but I'm not sure 
how to return a query without duplication.

This is far better than what I had this morning (which was no response from the 
server).

Thanks.  I'm new to joining tables...

Someone wrote back suggesting that SELECT DISTINCT could be used to to the job.

Another person suggested that using UNIQUE(profileID) would make it look nicer.  I 
wasn't sure how to use UNIQUE with the last JOIN as it isn't directly linked to 
WLPbib..

Any suggestions would be useful.

Mike



-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Abolish Nuclear Weapons Now!: http://pgs.ca/petition/
It is a miracle that curiosity survives formal education. - A Einstein


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] HTML question

2001-07-10 Thread Ken Sommers

Hello, pure HTML server question:

images like (backgroundimage.jpg) stored on server at: /htdocs/www/img

util.showpic.html is stored at :   /htdocs/util/

How to use backgroundimage.jpg as background in util.showpic.html  ?


body background=/www/img/backgroundimage.jpg 

does not work..
what if anything will work?

Thnaks 
Ken


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] HTML question

2001-07-10 Thread Ken Sommers

HI, thanks
not sure what the web root is.
first dir I see on FTP is  /  so is that the root?
and it contains a whole bunch of dirs including htdocs
htdocs contains dirs:  img (pics)   util (utility html pages)   www (main
html pages)

is there a way to refer to images in imgfrom html pages in  util AND www

I have things like  ../img/   not sure what that means.

thanks,
ken







- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 4:00 PM
Subject: Re: [PHP-DB] HTML question


 Is /htdocs/  your web root?  If it isn't the browser loading up the page
 would not have access to /www/img/backgroundimage.jpg.  If it is - try
 removing the space after the .jpg in your body tag.

 Tom


 At 15:51 10/07/2001 -0700, you wrote:
 Hello, pure HTML server question:
 
 images like (backgroundimage.jpg) stored on server at: /htdocs/www/img
 
 util.showpic.html is stored at :   /htdocs/util/
 
 How to use backgroundimage.jpg as background in util.showpic.html  ?
 
 
 body background=/www/img/backgroundimage.jpg 
 
 does not work..
 what if anything will work?
 
 Thnaks
 Ken
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] HTML question

2001-07-10 Thread Ken Sommers

I Looked up the root..sorry
 it is DOCUMENT_ROOT ..  /htdocs/www
so I guess browsers think they are starting out at /htdocs/www  and can't go
below to get anything?
so if I have phtml pages at /htdocs/util/ like
www.util.consumergrapevine.org/showdatabases.php and images at
/htdocs/www/img can I use an image in /htdocs/www/img  as sa background imge
in a page located in dir  /htdocs/util/  ??
if so,what would be the body tag look like?
body background=/img/backgroundimage.jpg   ?
or should I move my /img/ dir somewhere else like maybe throw 'em in with
all the pages in /htdocs/www
?

thanks again,

Ken

- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 4:00 PM
Subject: Re: [PHP-DB] HTML question


 Is /htdocs/  your web root?  If it isn't the browser loading up the page
 would not have access to /www/img/backgroundimage.jpg.  If it is - try
 removing the space after the .jpg in your body tag look like?
body background=/www/img/backgroundimage.jpg

 Tom


 At 15:51 10/07/2001 -0700, you wrote:
 Hello, pure HTML server question:
 
 images like (backgroundimage.jpg) stored on server at: /htdocs/www/img
 
 util.showpic.html is stored at :   /htdocs/util/
 
 How to use backgroundimage.jpg as background in util.showpic.html  ?
 
 
 body background=/www/img/backgroundimage.jpg 
 
 does not work..
 what if anything will work?
 
 Thnaks
 Ken
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Sub domain image referencing

2001-07-10 Thread Ken Sommers

Hello again,
 DOCUMENT_ROOT is..  /htdocs/www
I  have a php file ( showdatabases.php) in my subdomain area   /htdocs/util/
it loads up just fine: and if you click it, you will see my database
structure if you like..:)
www.util.consumergrapevine.org/showdatabases.php
I have images stored in  /hdocs/www/img/  right now  (of course i could move
them, and fix all references to them) but I like them there because I can
refer to images in pages in /www/ with background=img/bgpic.jpg...of
course this works just fine becuz /img/ is just down from /www/.
but now I have pages in subdomains as menitoned above like:
/htdocs/util/showdatabases.php
and of course I want to refer to images from those subdomain pages too,,and
of course
I don't want to have another dir with the same pics in them..something
like...  /htdocs/util/img/
becuz I already have the pics in /htdocs/www/img/  and if I make another sub
domain called /htdocs/stuff , I don't want to have to copy the pics AGAIN
into /htdocs/stuff/img
right? So,,, (yes I may be getting to the end now..) how or where should I
put my pics so the /www/ and /util/ and /stuff/ guys can use them as
background pics?

what would the body tag look like?
body background=../www/img/background.jpg   doesn;t work
what will?
body background=What??
thanks again,

Ken



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] RE: trash last message ,this ones right I think

2001-07-10 Thread Ken Sommers

Hello again,
 DOCUMENT_ROOT is..  /htdocs/www
I  have a php file ( showdatabases.php) in my subdomain area   /htdocs/util/
it loads up just fine: and if you click it, you will see my database
structure if you like..:)
http://util.consumergrapevine.org/showdatabases.php
I have images stored in  /hdocs/www/img/  right now  (of course i could move
them, and fix all references to them) but I like them there because I can
refer to images in pages in /www/ with background=img/bgpic.jpg...of
course this works just fine becuz /img/ is just down from /www/.
but now I have pages in subdomains as menitoned above like:
/htdocs/util/showdatabases.php
and of course I want to refer to images from those subdomain pages too,,and
of course
I don't want to have another dir with the same pics in them..something
like...  /htdocs/util/img/
becuz I already have the pics in /htdocs/www/img/  and if I make another sub
domain called /htdocs/stuff , I don't want to have to copy the pics AGAIN
into /htdocs/stuff/img
right? So,,, (yes I may be getting to the end now..) how or where should I
put my pics so the /www/ and /util/ and /stuff/ guys can use them as
background pics?

what would the body tag look like?
body background=../www/img/background.jpg   doesn;t work
what will?
body background=What??
thanks again,

Ken



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] RE: trash last message ,this ones right I think

2001-07-10 Thread Ken Sommers

Thanks Tom
 and sorry I didn't mention it properly at first,,
I was trying to analyse the problem.
is it becuz the first part of the referenece being the   ../
in body background=../www/img/background.jpg
the ../  wants to take the browser into illegal territory above the root?
because we are starting from /htdocs/util  so the  ../  would try to go back
to /htdocs

which is above the root (/htdocs/www) illegal territory.
just tryin to understand it

thanks ,
Ken

- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 5:50 PM
Subject: Re: [PHP-DB] RE: trash last message ,this ones right I think


 The problem is that they are completely different websites, from the web
 browser point of view - even though they are so close to each other on the
 server...  You should have mentioned this was a sub domain site :-)

 If you REALLY don't want to copy the image from the www folder to the util
 folder, then you have to use:

 body background=http://www.consumergrapevine.org/img/background.jpg;

 So that the browser can reach the image file.

 Tom



 At 17:30 10/07/2001 -0700, you wrote:
 Hello again,
   DOCUMENT_ROOT is..  /htdocs/www
 I  have a php file ( showdatabases.php) in my subdomain area
/htdocs/util/
 it loads up just fine: and if you click it, you will see my database
 structure if you like..:)
 http://util.consumergrapevine.org/showdatabases.php
 I have images stored in  /hdocs/www/img/  right now  (of course i could
move
 them, and fix all references to them) but I like them there because I can
 refer to images in pages in /www/ with background=img/bgpic.jpg
...of
 course this works just fine becuz /img/ is just down from /www/.
 but now I have pages in subdomains as menitoned above like:
 /htdocs/util/showdatabases.php
 and of course I want to refer to images from those subdomain pages
too,,and
 of course
 I don't want to have another dir with the same pics in them..something
 like...  /htdocs/util/img/
 becuz I already have the pics in /htdocs/www/img/  and if I make another
sub
 domain called /htdocs/stuff , I don't want to have to copy the pics AGAIN
 into /htdocs/stuff/img
 right? So,,, (yes I may be getting to the end now..) how or where should
I
 put my pics so the /www/ and /util/ and /stuff/ guys can use them as
 background pics?
 
 what would the body tag look like?
 body background=../www/img/background.jpg   doesn;t work
 what will?
 body background=What??
 thanks again,
 
 Ken
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] RE: trash last message ,this ones right I think

2001-07-10 Thread Ken Sommers


Thanks again,
why couldn't the main root be /htdocs/
?
ken
- Original Message -
From: Tom Peck [EMAIL PROTECTED]
To: Ken Sommers [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 6:05 PM
Subject: Re: [PHP-DB] RE: trash last message ,this ones right I think


 Yes that is correct.

 Your main site root is: /htdocs/www/
 And your sub site (util) root is /htdocs/util/

 These are two different sites from the browser's point of view.

 Neither site will have access to anything below the root folder (from the
 browser).

 Tom

 At 18:02 10/07/2001 -0700, you wrote:
 Thanks Tom
   and sorry I didn't mention it properly at first,,
 I was trying to analyse the problem.
 is it becuz the first part of the referenece being the   ../
 in body background=../www/img/background.jpg
 the ../  wants to take the browser into illegal territory above the root?
 because we are starting from /htdocs/util  so the  ../  would try to go
back
 to /htdocs
 
 which is above the root (/htdocs/www) illegal territory.
 just tryin to understand it
 
 thanks ,
 Ken
 
 - Original Message -
 From: Tom Peck [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 10, 2001 5:50 PM
 Subject: Re: [PHP-DB] RE: trash last message ,this ones right I think
 
 
   The problem is that they are completely different websites, from the
web
   browser point of view - even though they are so close to each other on
the
   server...  You should have mentioned this was a sub domain site :-)
  
   If you REALLY don't want to copy the image from the www folder to the
util
   folder, then you have to use:
  
   body
background=http://www.consumergrapevine.org/img/background.jpg;
  
   So that the browser can reach the image file.
  
   Tom
  
  
  
   At 17:30 10/07/2001 -0700, you wrote:
   Hello again,
 DOCUMENT_ROOT is..  /htdocs/www
   I  have a php file ( showdatabases.php) in my subdomain area
 /htdocs/util/
   it loads up just fine: and if you click it, you will see my database
   structure if you like..:)
   http://util.consumergrapevine.org/showdatabases.php
   I have images stored in  /hdocs/www/img/  right now  (of course i
could
 move
   them, and fix all references to them) but I like them there because I
can
   refer to images in pages in /www/ with background=img/bgpic.jpg
 ...of
   course this works just fine becuz /img/ is just down from /www/.
   but now I have pages in subdomains as menitoned above like:
   /htdocs/util/showdatabases.php
   and of course I want to refer to images from those subdomain pages
 too,,and
   of course
   I don't want to have another dir with the same pics in
them..something
   like...  /htdocs/util/img/
   becuz I already have the pics in /htdocs/www/img/  and if I make
another
 sub
   domain called /htdocs/stuff , I don't want to have to copy the pics
AGAIN
   into /htdocs/stuff/img
   right? So,,, (yes I may be getting to the end now..) how or where
should
 I
   put my pics so the /www/ and /util/ and /stuff/ guys can use them as
   background pics?
   
   what would the body tag look like?
   body background=../www/img/background.jpg   doesn;t work
   what will?
   body background=What??
   thanks again,
   
   Ken
   
   
   
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
  




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Fw: Referential Integrity

2001-07-10 Thread Ken Sommers


- Original Message -
From: Ken Sommers [EMAIL PROTECTED]
To: pak [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 10:29 PM
Subject: Re: Referential Integrity


 Ever play .,.Name that Code?

 I can delete those related rows in those 50 tables in about 5 lines..
 but first you gotta keep a table with the names of the 50 related tables
and
 the name of the foreign key in the row.

 then just loop around 50 times{
 get next table name and foreign key name form related_tables table
 Delete from related_table Where foreign_key = primary_key;
 }

 might work...!

 Ken

 - Original Message -
 From: pak [EMAIL PROTECTED]
 To: Ken Sommers [EMAIL PROTECTED]
 Sent: Tuesday, July 10, 2001 9:40 PM
 Subject: Re: Referential Integrity


  Ken,
  These are trivial examples. What if the Administrator changes the
 Employee's
  ID if the ID is not a pure numerical one and not a computer generated ?
 eg.
  IT001 represents employee in IT department. HR001 represents in Human
  Resources department.
  The point is the basic principle in database design : referential
 integrity
  gaurantee the master-detail relationship be maintained without data
loss.
  And this is the important function provided by DBMS.
  If we have a ER diagram when do the normalization, then we can see the
  tables invloved. How about if there are 200 tables in the database, and
50
  tables invloved, how many lines of code we have to write to do the
update
 in
  our program developed by ,say VB, VC++, Delphi.
 
  - Original Message -
  From: Ken Sommers [EMAIL PROTECTED]
  To: pak [EMAIL PROTECTED]
  Sent: Wednesday, July 11, 2001 2:26 PM
  Subject: Re: Referential Integrity
 
 
  | Thanks for nice example,
  | Question,,Why would you ever have to change these codes
  | [EmpID or SuburbCode]?, if they are meaningless, arbitrary, probably
  | computer-generated numbers that should have no intrinsic or any other
  | meaning of their own?,,Isn't; one meaningless number as good as the
 next?
  | ..
  | ken
  | - Original Message -
  | From: pak [EMAIL PROTECTED]
  | To: Ken Sommers [EMAIL PROTECTED]
  | Sent: Tuesday, July 10, 2001 9:08 PM
  | Subject: Re: Referential Integrity
  |
  |
  |  1)Table Employee
  |  EmpID
  |  Name
  |  Address
  |  Phone
  |  SuburbCode (reference table Suburb)
  | 
  |  2)Table Manager
  |  ManID (reference Employee)
  |  SubordinateID (reference table Employee)
  | 
  |  3)Table Suburb
  |  SuburbCode
  |  Suburb
  |  State
  |  Postcode
  | 
  |  If the user/Administrator of the application/database change the
  | SuburbCode
  |  for a particular Suburb,
  |  he needs to change the table Employee also for every record with
same
  |  SuburbCode.
  | 
  |  If the application allows the user/clerk changes the SuburbCode, my
  |  application needs to change the detail
  |  table (Employee).
  | 
  |  This is the same case as if any changes of EmpID in table Employee,
  | changes
  |  also need in table Manager explicitly.
  |  MySQL does not do that itself.
  | 
  | 
  |  - Original Message -
  |  From: Ken Sommers [EMAIL PROTECTED]
  |  To: pak [EMAIL PROTECTED]; [EMAIL PROTECTED]
  |  Sent: Wednesday, July 11, 2001 1:44 PM
  |  Subject: Re: Referential Integrity
  | 
  | 
  |  | Please give some examples where you would need the dbms to do the
  |  | referential integrity?
  |  | Ken
  |  | - Original Message -
  |  | From: pak [EMAIL PROTECTED]
  |  | To: Ken Sommers [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  |  | Sent: Tuesday, July 10, 2001 8:31 PM
  |  | Subject: Re: Referential Integrity
  |  |
  |  |
  |  |  So is MySQL not suitable for large corporate database ?
  |  |  - Original Message -
  |  |  From: Ken Sommers [EMAIL PROTECTED]
  |  |  To: pak [EMAIL PROTECTED]; [EMAIL PROTECTED]
  |  |  Sent: Wednesday, July 11, 2001 1:24 PM
  |  |  Subject: Re: Referential Integrity
  |  | 
  |  | 
  |  |  | hello,
  |  |  | Do simple input validation.
  |  |  |
  |  |  | If the user is entering what is supposed to be a primary key
  value,
  |  |  | make sure it is a valid key before sticking it in any where,
If
  it's
  | a
  |  |  bogus
  |  |  | key .tell the user to try again.
  |  |  |
  |  |  | If user wants you to delete rows from a  primary table
  | (customer)that
  |  | have
  |  |  | foreign keys( cust ID in Orders)that are still pointing to
  |  |  | something.(related table)..tell the user that this customer
 still
  | has
  |  |  | orders( yes you'll have to check yourself),,and deleting all
 those
  |  | orders
  |  |  | would make the accountants and IRS really mad. and you can;t
  delete
  |  the
  |  |  | customer without deleting all the orders,,and tell them
further
  more
  |  |  ,,that
  |  |  | deleting primary keys is bad practice anyway..should just set
 the
  |  active
  |  |  | flag to NO..cuz you still want all the history involved with
  that
  |  |  customer
  |  |  | around.. and further more,..IF a few years down the line that
  | customer

[PHP-DB] Fw: Referential Integrity

2001-07-10 Thread Ken Sommers


- Original Message -
From: Ken Sommers [EMAIL PROTECTED]
To: pak [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 10:46 PM
Subject: Re: Referential Integrity


 I started learning PHP Mysql about 2 weeks ago.
 I'm still reading the tutorials.
 Hopefuly some experienced programmers in PHP mysql will share how they
 cascade their updates when they change a primary key.

 But my guess is If you keep a table of related table names /foreign key
 names,,related to the table that needs to have it's updates cascaded,,you
 can code it in a few lines; maybe 5 or 10 lines  in PHP using mysql
 functions.
 I would love to see some real world examples.

 Ken

 - Original Message -
 From: pak [EMAIL PROTECTED]
 To: Ken Sommers [EMAIL PROTECTED]
 Sent: Tuesday, July 10, 2001 10:32 PM
 Subject: Re: Referential Integrity


  Ken,
  What I am doing is programmatically to cascade update the detail/related
  tables, that is the way.
  Every body know Oracle handles great in database operation, that is
 another
  story.
  I am asking for help, as I am not familiar with MySQL, is there other
way
 to
  do the update cascade besides doing so in application programming
  statements.
  - Original Message -
  From: Ken Sommers [EMAIL PROTECTED]
  To: pak [EMAIL PROTECTED]
  Sent: Wednesday, July 11, 2001 3:09 PM
  Subject: Re: Referential Integrity
 
 
  | OK agreed, if the primary keys have any human value which might need
  | changing,,then i recommend Oracle ..:)
  | IF the Employee ID has the department embedded in it( bad design
  | imho),,,then I recommend a dbms with Ref Integrety built in.
  | But if you have a system with all primary keys as computer-generated
  | meaningless values,
  | I can't; see a reason to ever have to change one of those keys.
  |
  | Then what about deleting primary-keyed rows that point to other
tables?
  | Maybe 50 other tables? hmmm it may be time for Oracle,,got any money?
  |
  | Ken
  |
  |
  |
  | - Original Message -
  | From: pak [EMAIL PROTECTED]
  | To: Ken Sommers [EMAIL PROTECTED]
  | Sent: Tuesday, July 10, 2001 9:40 PM
  | Subject: Re: Referential Integrity
  |
  |
  |  Ken,
  |  These are trivial examples. What if the Administrator changes the
  | Employee's
  |  ID if the ID is not a pure numerical one and not a computer
generated
 ?
  | eg.
  |  IT001 represents employee in IT department. HR001 represents in
Human
  |  Resources department.
  |  The point is the basic principle in database design : referential
  | integrity
  |  gaurantee the master-detail relationship be maintained without data
  loss.
  |  And this is the important function provided by DBMS.
  |  If we have a ER diagram when do the normalization, then we can see
the
  |  tables invloved. How about if there are 200 tables in the database,
 and
  50
  |  tables invloved, how many lines of code we have to write to do the
  update
  | in
  |  our program developed by ,say VB, VC++, Delphi.
  | 
  |  - Original Message -
  |  From: Ken Sommers [EMAIL PROTECTED]
  |  To: pak [EMAIL PROTECTED]
  |  Sent: Wednesday, July 11, 2001 2:26 PM
  |  Subject: Re: Referential Integrity
  | 
  | 
  |  | Thanks for nice example,
  |  | Question,,Why would you ever have to change these codes
  |  | [EmpID or SuburbCode]?, if they are meaningless, arbitrary,
probably
  |  | computer-generated numbers that should have no intrinsic or any
 other
  |  | meaning of their own?,,Isn't; one meaningless number as good as
the
  | next?
  |  | ..
  |  | ken
  |  | - Original Message -
  |  | From: pak [EMAIL PROTECTED]
  |  | To: Ken Sommers [EMAIL PROTECTED]
  |  | Sent: Tuesday, July 10, 2001 9:08 PM
  |  | Subject: Re: Referential Integrity
  |  |
  |  |
  |  |  1)Table Employee
  |  |  EmpID
  |  |  Name
  |  |  Address
  |  |  Phone
  |  |  SuburbCode (reference table Suburb)
  |  | 
  |  |  2)Table Manager
  |  |  ManID (reference Employee)
  |  |  SubordinateID (reference table Employee)
  |  | 
  |  |  3)Table Suburb
  |  |  SuburbCode
  |  |  Suburb
  |  |  State
  |  |  Postcode
  |  | 
  |  |  If the user/Administrator of the application/database change the
  |  | SuburbCode
  |  |  for a particular Suburb,
  |  |  he needs to change the table Employee also for every record with
  same
  |  |  SuburbCode.
  |  | 
  |  |  If the application allows the user/clerk changes the SuburbCode,
 my
  |  |  application needs to change the detail
  |  |  table (Employee).
  |  | 
  |  |  This is the same case as if any changes of EmpID in table
 Employee,
  |  | changes
  |  |  also need in table Manager explicitly.
  |  |  MySQL does not do that itself.
  |  | 
  |  | 
  |  |  - Original Message -
  |  |  From: Ken Sommers [EMAIL PROTECTED]
  |  |  To: pak [EMAIL PROTECTED]; [EMAIL PROTECTED]
  |  |  Sent: Wednesday, July 11, 2001 1:44 PM
  |  |  Subject: Re: Referential Integrity
  |  | 
  |  | 
  |  |  | Please give some examples where you would need the dbms to do

Re: [PHP-DB] Re: Homesite Server Mapping

2001-07-08 Thread Ken Sommers

Thanks alot,
 that mapping works for me too: I use

From: C:\Program Files\Apache Group\Apache\htdocs\

To: http://localhost

for local mapping

Have you ever tried mapping to your REMOTE host?

I have tried and failed too many times, what works for Remote mapping?
any one ever done it?

Thanks,
Ken

Hugh Bothwell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Ken Sommers [EMAIL PROTECTED] wrote in message
 001001c107e2$b84ad5c0$aa42500c@zeospantera">news:001001c107e2$b84ad5c0$aa42500c@zeospantera...
  Has anyone successfully mapped their browser to a Remote Server?
 
  Please show your:
  map from:

 C:\Program Files\Apache Group\Apache\htdocs\

  Map to:

 http://127.0.0.1/

 (http://localhost/  would do exactly the same thing more prettily, but
would
 bug me about connecting before doing it.)

PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Can anyone recommend PHPLIB?

2001-07-08 Thread Ken Sommers

Can anyone recommend PHPLIB? for authentication and session management? or
something else?



thanks Ken



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] setting cookies so the cookie will expire when the user's session ends.

2001-07-05 Thread Ken Sommers

Hello,
any way to set cookies so the cookie will expire when the user's session
ends.

IN PHP 4?

Ken


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Authomatic Sorting

2001-07-05 Thread Ken Sommers

HI,
Look into Optimizing the Table..
it seems to clean up the holes.

Ken
- Original Message -
From: Wilmar Pérez [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Wednesday, July 04, 2001 1:50 PM
Subject: [PHP-DB] Authomatic Sorting


 Hello guys

 I have the following two problems:

 I've got a table with an autoincrement field which is the registry's ID,
 everything goes well until I delete any registry.  MySQL doesn't re-sorts
 the information.  That is, I have the following:

 001  user1
 002  user2
 003  user3

 If I delete user2, I would like to have something as shown next:

 001  user1
 002  user3

 But instead I end up with the following:

 001  user1
 003  user3

 Any idea or comment?
 ---
 Wilmar Pérez
  IT Manager - Central Library
  University of Antioquia
Medellín - Colombia
   tel: ++57(4)2105145
 ---


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: setting cookies so the cookie will expire when the user's session ends.

2001-07-05 Thread Ken Sommers

Kelvin,
thanks,

do you believe or hopefully even know that that expiration time for this
cookie:

setcookie (TestCookie, $value,time()+3600);  /* expire in 1 hour */

will be one hour after the cookie is set OR
one hour after the session expires?

Ken

Kelvin [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Ken,

  Do not specific the time in your cookie.

 ex: setcookie(usercookie,$username);
 once the user close the session, it will terminate the cookie.

 Kelvin.


 Ken Sommers [EMAIL PROTECTED] wrote in message
 001701c1056d$2cb7c620$ca42500c@zeospantera">news:001701c1056d$2cb7c620$ca42500c@zeospantera...
  Hello,
  any way to set cookies so the cookie will expire when the user's session
  ends.
 
  IN PHP 4?
 
  Ken
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


- Original Message -
From: Kelvin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 05, 2001 3:11 PM
Subject: [PHP-DB] Re: setting cookies so the cookie will expire when the
user's session ends.


 Hi Ken,

  Do not specific the time in your cookie.

 ex: setcookie(usercookie,$username);
 once the user close the session, it will terminate the cookie.

 Kelvin.


 Ken Sommers [EMAIL PROTECTED] wrote in message
 001701c1056d$2cb7c620$ca42500c@zeospantera">news:001701c1056d$2cb7c620$ca42500c@zeospantera...
  Hello,
  any way to set cookies so the cookie will expire when the user's session
  ends.
 
  IN PHP 4?
 
  Ken
 



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Authomatic Sorting

2001-07-04 Thread Ken Sommers

D you ever create an index on the primary key to speed things up??
ken
- Original Message -
From: Paul Burney [EMAIL PROTECTED]
To: Wilmar Pérez [EMAIL PROTECTED]; PHP List
[EMAIL PROTECTED]
Sent: Wednesday, July 04, 2001 3:18 PM
Subject: Re: [PHP-DB] Authomatic Sorting


on 7/4/01 1:50 PM, Wilmar Pérez at [EMAIL PROTECTED] wrote:

 I've got a table with an autoincrement field which is the registry's ID,
 everything goes well until I delete any registry.  MySQL doesn't re-sorts
 the information.  That is, I have the following:

snip

Just add an ORDER BY clause to your query.  That is, if you want to sort
by reg_id, append ORDER BY reg_id.  You can also add a DESC keyword to put
them in reverse order.

HTH.

Sincerely,

Paul Burney

++
Paul Burney
Webmaster  Open Source Developer
UCLA - GSEIS - ETU
(310) 825-8365
[EMAIL PROTECTED]
http://www.gseis.ucla.edu/
++



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] kinda unrelated, but curious...

2001-07-03 Thread Ken Sommers

HI,
I stumbled on this site
http://www.missoulaweb.com/freelance.phtml
see if you think it is cool..

Ken
- Original Message -
From: David Balatero [EMAIL PROTECTED]
To: Szii [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, July 03, 2001 12:03 AM
Subject: RE: [PHP-DB] kinda unrelated, but curious...


 Can you recommend job boards I won't have to pay to use?

 -- David

 -Original Message-
 From: Szii [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 02, 2001 11:27 PM
 To: David Balatero; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] kinda unrelated, but curious...


 Most of the time, by word of mouth.  Other than that, scan the 'net, look
on
 the
 job boards.  If you're new to the field, put your name in a couple
 recruiters hands.
 Sure, it's not freelance, and you won't make as much, but a couple jobs
and
 you
 start to become known.  Once you're known, and have a portfolio, it just
 gets
 easier from there on out.

 Also look for part time work from home PHP jobs.  You can pick up some
 reputation that way before quitting your REAL job.  These are a real
PITA
 to
 find, but they do exist.

 Oh, and let all your friends know that you're a PHP/web coder looking for
 work.
 It's amazing how many people know people that know people and you end up
 with work. 8-)

 -Szii


 - Original Message -
 From: David Balatero [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 02, 2001 11:27 PM
 Subject: [PHP-DB] kinda unrelated, but curious...


  ...where do you people pick up freelance jobs? Any input on this?
 
  -
  David Balatero
  [EMAIL PROTECTED]
  -
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] adding Carrol O'Conner in a form

2001-06-30 Thread Ken Sommers

HI,
IF i add my name as Carol O'Conner in a form and Echo (PHP 4.06 on win 95) it back I 
see 

Carol O\'Conner 

If I pass that name along to another page I'll see it as:

 Carol O\\\'Conner 

Even if I use :  ?php echo(htmlspecialchars ($name, ENT_QUOTES)); ?

IF I enter my name as:Carol O'Conner died 
I'll see it echoed as

Carol O\'Conner died 

so I am thrilled that the  came back and was displayed as it was typed in by the user

but how do I get rid of that pesky slash \   ?

so I can echo exactly what the user typed in?

I am already using:

 ?php echo(htmlspecialchars ($name, ENT_QUOTES)); ?

Thanks for the help,

ken



[PHP-DB] PHP insert into Access autonumber, get inserted value back?

2001-06-20 Thread Ken

I have an Access database that PHP will be accessing.  (I'm assuming I have to do this 
via ODBC and the Unified ODBC functions in PHP, but correct me if I'm wrong.)

The PHP script will be inserting new records into the Access database.

The primary key in many of the tables in the Access database is an autonumber field. 
 Thus, the key value will be unknown until after I make the insert call.

My question: Either before or after the insert, is there any way for me to find out 
what the key value is?  I know if I were using MySQL, I could call the 
mysql_insert_id() function to get this information.

This is critical to me, because my project entails maintaining a new database 
(actually, a MySQL database) that contains the same information as an existing Access 
database.  Changes will be made to the new database, which then need to be propagated 
to the Access database.  In order for these databases to remain synchronized, I need 
the primary keys to be the same in both databases, clearly.

Thanks for any suggestions!

- Ken
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] web to access/excel

2001-05-22 Thread Ken Wills


You can write excel files (ie files that excel associates with, if you have it) very 
easily
by just using a .csv extension, and the following type format:

field1, field2, field3

(ie print \field1\,\field2\,\field3\; )
Excel will display this as if it were a spreadsheet.

If you need to get more fancy than this, you could create something to write .dif files
(again, a text based format.)

Ken

* Jonathan Hilgeman [EMAIL PROTECTED] [010522 10:16]:
 Hi Russ,
 Try this package:
 http://phpclasses.upperdesign.com/browse.html/package/237
 
 You need to register for free to gain access, but this package is supposed
 to write Excel binary files. 
 
 Jonathan
 
 -Original Message-
 From: Russ Michell [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 22, 2001 5:01 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: [PHP-DB] web to access/excel
 
 
 *Apologies for cross-postings**
 
 Hi there all:
 
 Does anyone know of a product - preferably free, that once 
 installed, can take info from an ordinary HTML web based form and 
 drop it into an access/excel database/spreadsheet?? or a 
 pre-defined/written script or class written for Apache/php4/MySQL that 
 has the information filtering and sorting capabilites of excel/access??
 
 One of our departments urgently requires such functionality to increase 
 processing times of student enquiries. At present the information from 
 the students is in a non-standardised format in the form of an email 
 that has to be processed by hand.
 
 The data needs to be formalised from a structured online form, and 
 inserted into an access/excel type 'environment' that current 
 (non-web technical) administrators are familliar with.
 
 Any suggestions are most welcome.
 
 Again I apologise for the cross posting but this is a pressing matter, 
 that requires I find a pointer to a solution, or an actual solution 
 as fast as I can!
 
 Kind regards:
 Russ
 
 
 
 #---#
   
   Believe nothing - consider everything 
   
   Russ Michell
   Anglia Polytechnic University Webteam
   
   e: [EMAIL PROTECTED]
   w: www.apu.ac.uk/webteam
   t: +44 (0)1223 363271 x 2331
 
   www.theruss.com
   
 #---#
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Random - not that random

2001-05-17 Thread Ken Wills

Hi Dan,

You need to call mt_srand() first to seed the random number generator. It's all 
described here:

http://www.php.net/manual/en/function.mt-rand.php

Ken

* Dan Eskildsen [EMAIL PROTECTED] [010517 14:22]:
 Newbie alert
 
 Hi!  Here is a piece of coding.  It randomly choose between four options to
 display on my homepage.  The problem is that it doesn't seem to be that
 random - rather biased.  The last option $message[3] is displayed 9 out of
 10 times.  Any suggestions?
 
 script language=php
 
 $message[0] = 'a href=index.php3?Page=vognimg border=0
 src=images/trolley.jpgbrRengøringsvogne, mopper m.m./a';
 $message[1] = 'a href=index.php3?Page=nilfiskimg border=0
 src=images/nilfisk.gifbrNilfisk Advance rengøringsmaskiner/a';
 $message[2] = 'a href=index.php3?Page=poleringimg border=0
 src=images/ladder.jpgbrHar du set vores Vinduespudserstiger?/a';
 $message[3] = 'a href=index.php3?Page=polishimg
 border=0src=images/logo-bison.gifbrVi importerer selv vore polisher
 fra en af Canadas førende Polishfabrikker./a';
 
 $number = mt_rand(0,3) ;
 print$message[$number];
 
 /script
 
 --
 ==
 Regards from Denmark, Europe
 Please cc your reply to [EMAIL PROTECTED]
 ==
 I haven't lost my mind, I've got it backed up on TAPE somewhere...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Tricky database query involving two tables

2001-02-28 Thread Ken

I have a tricky database query I can't figure out how to write.  I have a PHP app 
using MySQL that does a query like this:

(main query)
select * from A left join B on something
where B.thing = "1"

This gets me everything in A where its corresponding element in B has a certain 
attribute.

What I want is to be able to now do this:
select * from A
where A not in the result set of the main query

I can't just do:
select * from A left join B on something
where B.thing != "1" or B.thing is NULL

because things in A might occur more than once in B, (or not at all in B, but that's 
covered by the NULL part), and so this query would return things in A that I already 
got in the main query.

Is there a way to do this in MySQL?  Or do I have to just query everything, and then 
have the skipping logic be in PHP?  I'd love to encapsulate this in a query.  Would it 
involve subqueries (something I know that MySQL doesn't directly support)?

Let me know if I need to be more clear or specific in my question.

Thanks!

- Ken
[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]