Re: [PHP-DB] HTML mail

2003-11-02 Thread Jonathan Villa
Set Content-Type: text/html in your headers

And just enter in html as your body

example

$body = "\n





the rest of your html


";

mail($to,$subject,$body,$headers)

get the picture?


On Sun, 2003-11-02 at 19:20, Ronald Wiplinger wrote:
> I got an interesting program to do:
> 
> For an MLM company I should make the news letter from the upline to the
> direct downline (A sends emails to his NEXT DIRECT downline B1~ B12 emails)
> To use a database with the from-line and the (three only) to-lines from 
> the same data
> base is easy. HOWEVER, they want me to send HTML emails (with their
> products )
> 
> How can I send a HTML email via php?
> 
> bye
> 
> Ronald
> 
> -- 
> Ronald Wiplinger  (CEO of ELMIT)
> http://www.elmit.com+886 (0) 915 653-452
> - I'm a SpamCon Foundation Member, #694, Verify it at http://www.spamcon.org
> 
> 
> PS: Spam prevention!
> Our system is protected with a spam prevention program. 
> If you send us an e-mail, our system will send you a confirmation message back. Just 
> reply to this confirmation message please. 
> After receiving this confirmation message, our system will send the hold message 
> (one) and all future messages (after the received confirmation message) to me 
> without asking you again.

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



Re: [PHP-DB] Excel file into MySQL

2003-09-30 Thread Jonathan Villa
right...

I was just looking for a quick answer without having to look for it
myself... (I tend to be a little self-centered sometimes, sorry)


On Tue, 2003-09-30 at 13:29, Jason Wong wrote:
> On Wednesday 01 October 2003 02:23, Jonathan Villa wrote:
> > On Tue, 2003-09-30 at 10:31, Jonathan Villa wrote:
> > > Is it possible to transfer information from an excel file (33,000 rows)
> > > into MySQL using phpMyAdmin or MySQL CC?
> 
> Be patient!
> 
> In the meantime how about reading the manuals/feature list for those two 
> applications you mentioned? And asking on *their* mailing lists?
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-db
> --
> /*
> "The fundamental principle of science, the definition almost, is this: the
> sole test of the validity of any idea is experiment."
> -- Richard P. Feynman
> */

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



Re: [PHP-DB] Excel file into MySQL

2003-09-30 Thread Jonathan Villa
On Tue, 2003-09-30 at 10:31, Jonathan Villa wrote:
> Is it possible to transfer information from an excel file (33,000 rows)
> into MySQL using phpMyAdmin or MySQL CC?

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



[PHP-DB] Excel file into MySQL

2003-09-30 Thread Jonathan Villa
Is it possible to transfer information from an excel file (33,000 rows)
into MySQL using phpMyAdmin or MySQL CC?

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



Re: [PHP-DB] Working query not able to run with PHP script.

2003-09-18 Thread Jonathan Villa
Sorry, I meant referenced in another table not database


On Thu, 2003-09-18 at 16:09, Jonathan Villa wrote:
> I have several tables I want to delete as well as their reference in
> another database
> 
> The query produced is this:
> ===
> DROP TABLE xxx.zorder_47629403705b7e7f0c97387559d8c811; DELETE FROM
> orders WHERE table_name = "zorder_47629403705b7e7f0c97387559d8c811";
> DROP TABLE xxx.zorder_17d991f48de0fdd157c31e77780d919e; DELETE FROM
> orders WHERE table_name = "zorder_17d991f48de0fdd157c31e77780d919e";
> DROP TABLE xxx.zorder_b2709995c3d487b7e19e878ccbbd19cd; DELETE FROM
> orders WHERE table_name = "zorder_b2709995c3d487b7e19e878ccbbd19cd";
> DROP TABLE xxx.zorder_7702fe78ee529c001ee989afc5471b94; DELETE FROM
> orders WHERE table_name = "zorder_7702fe78ee529c001ee989afc5471b94";
> DROP TABLE xxx.zorder_1b0ee4e8d5d556debe217074ccc62bbc; DELETE FROM
> orders WHERE table_name = "zorder_1b0ee4e8d5d556debe217074ccc62bbc";
> DROP TABLE xxx.zorder_d1d918c6231328c09dee573201e81102; DELETE FROM
> orders WHERE table_name = "zorder_d1d918c6231328c09dee573201e81102";
> DROP TABLE xxx.zorder_8d9f0fc5e5f4e64d1207063de7abcff1; DELETE FROM
> orders WHERE table_name = "zorder_8d9f0fc5e5f4e64d1207063de7abcff1";
> ===
> 
> If I run this query in PHPMyAdmin or MySQL CC, and echo out mysql_error
> I get the following message
> 
> You have an error in your SQL syntax. Check the manual that corresponds
> to your MySQL server version for the right syntax to use near ';DELETE
> FROM orders WHERE table_name = "zorder_47629403705b7e7f
> 
> Here is my script...
> $sql = 'SELECT table_name FROM orders WHERE completed = "-00-00
> 00:00:00"';
> $objRecordSet = new RecordSet($sql);
> $sql = '';
> while ($rows = mysql_fetch_array($objRecordSet->getResultID())) {
> //$sql .= ' DROP TABLE xxx.'.$rows['table_name'].';DELETE FROM orders
> WHERE table_name = "'.$rows['table_name'].'";';
> }
> $dbConn = mysql_connect("localhost", "root", "new-password");
> mysql_select_db("xxx", $dbConn);
> mysql_query($sql, $dbConn);
> echo "".mysql_error();
> 
> Any ideas

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



[PHP-DB] Working query not able to run with PHP script.

2003-09-18 Thread Jonathan Villa
I have several tables I want to delete as well as their reference in
another database

The query produced is this:
===
DROP TABLE xxx.zorder_47629403705b7e7f0c97387559d8c811; DELETE FROM
orders WHERE table_name = "zorder_47629403705b7e7f0c97387559d8c811";
DROP TABLE xxx.zorder_17d991f48de0fdd157c31e77780d919e; DELETE FROM
orders WHERE table_name = "zorder_17d991f48de0fdd157c31e77780d919e";
DROP TABLE xxx.zorder_b2709995c3d487b7e19e878ccbbd19cd; DELETE FROM
orders WHERE table_name = "zorder_b2709995c3d487b7e19e878ccbbd19cd";
DROP TABLE xxx.zorder_7702fe78ee529c001ee989afc5471b94; DELETE FROM
orders WHERE table_name = "zorder_7702fe78ee529c001ee989afc5471b94";
DROP TABLE xxx.zorder_1b0ee4e8d5d556debe217074ccc62bbc; DELETE FROM
orders WHERE table_name = "zorder_1b0ee4e8d5d556debe217074ccc62bbc";
DROP TABLE xxx.zorder_d1d918c6231328c09dee573201e81102; DELETE FROM
orders WHERE table_name = "zorder_d1d918c6231328c09dee573201e81102";
DROP TABLE xxx.zorder_8d9f0fc5e5f4e64d1207063de7abcff1; DELETE FROM
orders WHERE table_name = "zorder_8d9f0fc5e5f4e64d1207063de7abcff1";
===

If I run this query in PHPMyAdmin or MySQL CC, and echo out mysql_error
I get the following message

You have an error in your SQL syntax. Check the manual that corresponds
to your MySQL server version for the right syntax to use near ';DELETE
FROM orders WHERE table_name = "zorder_47629403705b7e7f

Here is my script...
$sql = 'SELECT table_name FROM orders WHERE completed = "-00-00
00:00:00"';
$objRecordSet = new RecordSet($sql);
$sql = '';
while ($rows = mysql_fetch_array($objRecordSet->getResultID())) {
//$sql .= ' DROP TABLE xxx.'.$rows['table_name'].';DELETE FROM orders
WHERE table_name = "'.$rows['table_name'].'";';
}
$dbConn = mysql_connect("localhost", "root", "new-password");
mysql_select_db("xxx", $dbConn);
mysql_query($sql, $dbConn);
echo "".mysql_error();

Any ideas

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



Re: [PHP-DB] Need to Run a PHP script using CRON or ?

2003-09-16 Thread Jonathan Villa
Well, I performed a simple test...

I created a file in a dir outside of my webroot with a simple

echo phpinfo();

I then simply /usr/local/bin/php phptest.php

it worked... great... next attempt is the CRON, which I am assuming will
work...


On Tue, 2003-09-16 at 06:58, Martin Marques wrote:
> El Lun 15 Sep 2003 17:47, Jonathan Villa escribió:
> > I believe this would need php to installed as a cgi, which I prefer not
> > to do...
> 
> If you don't want to because of security resons, please install it and don't 
> leave it in the hands of the web server.
> If you don't want to go through the problem of compiling, then you might think 
> about finding on the net a binary PHP for you operating system.
> 
> 
> --
>  08:55:02 up 25 days, 45 min,  4 users,  load average: 0.71, 0.51, 0.50
> -
> Martín Marqués  |[EMAIL PROTECTED]
> Programador, Administrador, DBA |   Centro de Telematica
>Universidad Nacional
> del Litoral
> -

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



RE: [PHP-DB] Need to Run a PHP script using CRON or ?

2003-09-15 Thread Jonathan Villa
I believe this would need php to installed as a cgi, which I prefer not
to do...


On Mon, 2003-09-15 at 15:31, Ryan Marks wrote:
> Not necessarily.  You can wget /path/to/file.php or my personal preference
> is not to use wget, but php directly
> /path/to/php/executable /path/to/file.php
> 
> Just a thought,
> Ryan
> 
> -Original Message-
> From: Jonathan Villa [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 15, 2003 3:28 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Need to Run a PHP script using CRON or ?
> 
> 
> 
> Interesting... how does this fair concerning security?  So I'll have to
> have this file located in my document root, is this a good thing?  My
> current directory structure consists of several files located outside
> the doc root.  I guess I could always include it onto a page
> 
> 
> On Mon, 2003-09-15 at 14:49, CPT John W. Holmes wrote:
> > From: "Jonathan Villa" <[EMAIL PROTECTED]>
> >
> >
> > > I have an application which creates temporary tables.  My plan is to
> > > remove them after a 24 hour period and only those which are have a
> > > created time greater than 24 hours.  That part I can do, my question is
> > > how will I be able to run this script which is a 2 part script.
> > >
> > > First thing I do is pull the names of the temporary tables which are
> > > going to be deleted from another table.  From this result set, I need to
> > > DROP tables as well as remove the reference to them from the first
> > > table.
> > >
> > > I understand that I can run PHP from the command line but this would
> > > require PHP to installed as a CGI which I prefer not to do.
> > >
> > > I was hoping I that I could use CRON to run this script once a day...
> >
> > You can. Create a php script that does what you want. It should not create
> > any output, either log status/error messages or send an email.
> >
> > If you save it as cron.php, you can use a command such as the following in
> > your crontab:
> >
> > wget -q -O - www.domain.com/cron.php > /dev/null
> >
> > I'm assuming you know the specifics of cron or can google for it. :)
> >
> > ---John Holmes...
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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



Re: [PHP-DB] Need to Run a PHP script using CRON or ?

2003-09-15 Thread Jonathan Villa

Interesting... how does this fair concerning security?  So I'll have to
have this file located in my document root, is this a good thing?  My
current directory structure consists of several files located outside
the doc root.  I guess I could always include it onto a page


On Mon, 2003-09-15 at 14:49, CPT John W. Holmes wrote:
> From: "Jonathan Villa" <[EMAIL PROTECTED]>
> 
> 
> > I have an application which creates temporary tables.  My plan is to
> > remove them after a 24 hour period and only those which are have a
> > created time greater than 24 hours.  That part I can do, my question is
> > how will I be able to run this script which is a 2 part script.
> >
> > First thing I do is pull the names of the temporary tables which are
> > going to be deleted from another table.  From this result set, I need to
> > DROP tables as well as remove the reference to them from the first
> > table.
> >
> > I understand that I can run PHP from the command line but this would
> > require PHP to installed as a CGI which I prefer not to do.
> >
> > I was hoping I that I could use CRON to run this script once a day...
> 
> You can. Create a php script that does what you want. It should not create
> any output, either log status/error messages or send an email.
> 
> If you save it as cron.php, you can use a command such as the following in
> your crontab:
> 
> wget -q -O - www.domain.com/cron.php > /dev/null
> 
> I'm assuming you know the specifics of cron or can google for it. :)
> 
> ---John Holmes...

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



[PHP-DB] Need to Run a PHP script using CRON or ?

2003-09-15 Thread Jonathan Villa
I have an application which creates temporary tables.  My plan is to
remove them after a 24 hour period and only those which are have a
created time greater than 24 hours.  That part I can do, my question is
how will I be able to run this script which is a 2 part script.

First thing I do is pull the names of the temporary tables which are
going to be deleted from another table.  From this result set, I need to
DROP tables as well as remove the reference to them from the first
table.

I understand that I can run PHP from the command line but this would
require PHP to installed as a CGI which I prefer not to do.

I was hoping I that I could use CRON to run this script once a day...

Any ideas?  

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



RE: [PHP-DB] Define()

2003-03-18 Thread Jonathan Villa
Edwin, 

There is no $ in front of the vars because it's a constant.  $ signifies
a variable.  A variable's value can change, a constant's value cannot.

 
---> Jonathan
 
 
 
-Original Message-
From: Edwin Boersma [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 18, 2003 2:43 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Define()

Where is the $-sign in front of the vars???

Edwin

Jonathan Villa wrote:
> Jim, 
>  
> I don't think that matters.  One can escape into PHP in several ways
> (depending on the php.ini config of course)
>  
> 1. 2. 3.

RE: [PHP-DB] Define()

2003-03-12 Thread Jonathan Villa
Jim, 
 
I don't think that matters.  One can escape into PHP in several ways
(depending on the php.ini config of course)
 
1.   Jonathan
 
 
 
-Original Message-
From: Jim Hunter [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 2:59 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Define()
 

Looking at your source you are still missing the php in the script. it
has to look like:
 

note the php |||
 
add this and try it again.
Jim

 


 
 
 
 
 
 
 


 
 
 
 


RE: [PHP-DB] Define()

2003-03-12 Thread Jonathan Villa
For starters, and in general, does anyone know why a view source would
not work in IE 6?  This hasn't worked for weeks, so I usually have to
use Mozilla to view the source.  
 
Anyway, Jim, this is my basic page setup.
 

This is where my HTML codes goes.
So for example, a link to another page would look like this
link
 
a form would look like this
 



 
Note: within store_config.php I am declaring the constants along with
including some other files which I reference. For example, there is a
file called system_messages.php from which I pull "system messages" like
"Item was added to your cart", "Please enter in all the required
information", etc.
 
Currently I have the constant IMG_HOME_PATH set to
/killerspin/web/images/ and everything is fine.
 
For DOC_HOME_PATH I have /killerspin/web/store/ but I get all kinds of
errors like "could not create stream".
 
Specifically
 
Here is the code.
 

This is the index page.

 
 and here is the output
 
Warning: main(/killerspin/web/store/common/header.php) [function.main
 ]: failed to create stream: No such
file or directory in D:\is\clients\killerspin\web\store\index.php on
line 3
 
So I replace the code with this, 
 
include_once("/killerspin/web/store/common/header.php");
 
Same thing happens, but if I put
 
include_once("http://localhost/killerspin/web/store/common/header.php";);
then it's fine BUT the images don't show and I haven't changed a thing
on the for IMG_HOME_PATH!!
 
So in summary, maybe my question should have started with
 
"How can I correctly use constants/variables to substitute for the
directory path so that I don't have to always include the entire path."
For example, in the event that my image directory changes or a directory
changes from login to register, then I don't want to have to go into
EVERY SINGLE  page and line of code to change it.
 
 
---> Jonathan
 
 
 


RE: [PHP-DB] Define()

2003-03-12 Thread Jonathan Villa
Jim,

Thanks for reply.

I haven't moved this into production yet, the d:/is/ was just for
testing as well as because when I use /client_name, the links do not
work.

I will to use the variable names instead of the define and see where
this gets me.

Just to note, I tried 

define(IMG_HOME_ROOT, "/client_name/web/images/");

and it didn't work

What would be the difference between using that and

$img_dir = "/client_name/web/images/";

 
---> Jonathan
 
 
 

-Original Message-
From: Jim Hunter [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 12:58 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Define()

The reason it doesn't work may go beyond PHP. You are trying to make an
HREF
point to an exact location on your hard drive. When the user of your web
page clicks the link, they do not have that location on their system so
it
will fail. Always use relative locations for links. Then once you get
that
ironed out, skip the defines, just use the variables. Change the code to
be:

 

$doc_dir = "/store/";

$image_dir = "/images/";

$control_dir = "/control/";



""verify_login.php"

click here

 

and don't forget the 'php' after the "verify_login.php"

2. I cannot use links as click

here



Has anyone had a lot of use with define and in my scenario. I don't the

problem is with the db results, I think it's more of the define().



Like I said above, I am using this on linux as well as windows.







==

Every chance I get, I try to incorporate 

Open Source resources into my everyday

work. Maybe instead of of paying Microsoft

for software, the money can added to my

salary.

==







-- 

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] Define()

2003-03-12 Thread Jonathan Villa

I am developing an app which needs 3 constants.  The value of these
constants comes from a database result.

This works fine.  My problem is that they do not work very well.  I am
developing on both windows/Linux (depending what I boot into).

This is the effect I want

$doc_dir = the string of d:/is/clients/client/web/store/
$image_dir = the string of d:/is/clients/client/web/images/
$control_dir = the string of d:/is/clients/client/web/control/ 

define(HOME_DOC_ROOT,$doc_dir);
define(IMAGE_DOC_ROOT,$image_dir);
define(CONTROL_DOC_ROOT,$control_dir);

The outcome is that 

1.  I cannot submit pages using action=""verify_login.php"
2.  I cannot use links as click
here

Has anyone had a lot of use with define and in my scenario.  I don't the
problem is with the db results, I think it's more of the define().

Like I said above, I am using this on linux as well as windows.



==
Every chance I get, I try to incorporate 
Open Source resources into my everyday
work.  Maybe instead of of paying Microsoft
for software, the money can added to my
salary.
==



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



RE: [PHP-DB] Easy array question...

2003-03-12 Thread Jonathan Villa
Try it with the original array first, just for testing

 
---> Jonathan
 
 
 

-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 11:10 AM
To: '[EMAIL PROTECTED]'; 'Hutchins, Richard'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Easy array question...

Here is basically what I have and what I am getting...

The section of code to copy and then process the copied array:

$other2 = array();
array_push($other2, $other);

foreach ($other2 as $test) {
if ($test == "") {
echo "NOTHING"."";
} else {
echo $test."";
}
}

Basically, what I want is if the array element is nothing, then
output as a test NOTHING.  If the array element has some value, then
output
as a test that value.  Currently, from this code the output I am
actually
getting is:

Array

    Thanks again.

-Original Message-
From: Jonathan Villa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 10:58 AM
To: [EMAIL PROTECTED]; NIPP, SCOTT V (SBCSI); 'Hutchins, Richard';
[EMAIL PROTECTED]
Subject: RE: [PHP-DB] Easy array question...


Sorry, I just reread your post

$array_copy = array();
array_push($array_copy, $original_array);

echo $array_copy[0];//or whatever to test

 
---> Jonathan
 
 
 

-Original Message-
From: Jonathan Villa [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 10:56 AM
To: 'NIPP, SCOTT V (SBCSI)'; 'Hutchins, Richard'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Easy array question...

$array_copy = array();
array_push($array_copy, $_SESSION['original_array']);

echo $array_copy[0];//or whatever to test

 
---> Jonathan
 
 
 
-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 10:43 AM
To: 'Hutchins, Richard'; '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Easy array question...

I don't think that is the case because I am able to access the
original array in this same page without having to use the session
variable
reference.  Won't hurt to give it a try though.  Thanks for the
feedback.

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 10:40 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Easy array question...


Are you using:

$array2 = $_SESSION["array1"];

Not sure that will do the trick, but it was my first inclination.

Rich

> -Original Message-
> From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2003 11:37 AM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] Easy array question...
> 
> 
>   I create an array on one page and then process it on 
> the next page
> as I have registered the array as a session variable.  I need 
> to basically
> process one of these arrays twice, so I want to make a copy 
> of the array.
> The question is how do I do this?  I have tried the following:
> 
> $array2 = $array1;
> 
>   This doesn't seem to do the trick for me.  Is this 
> correct and I am
> just missing something elsewhere, or is there another way to 
> copy an array?
> Thanks.
> 
> Scott Nipp
> Phone:  (214) 858-1289
> E-mail:  [EMAIL PROTECTED]
> Web:  http:\\ldsa.sbcld.sbc.com
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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

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



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



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



RE: [PHP-DB] Easy array question...

2003-03-12 Thread Jonathan Villa
Sorry, I just reread your post

$array_copy = array();
array_push($array_copy, $original_array);

echo $array_copy[0];//or whatever to test

 
---> Jonathan
 
 
 

-Original Message-
From: Jonathan Villa [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 10:56 AM
To: 'NIPP, SCOTT V (SBCSI)'; 'Hutchins, Richard'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Easy array question...

$array_copy = array();
array_push($array_copy, $_SESSION['original_array']);

echo $array_copy[0];//or whatever to test

 
---> Jonathan
 
 
 
-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 10:43 AM
To: 'Hutchins, Richard'; '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Easy array question...

I don't think that is the case because I am able to access the
original array in this same page without having to use the session
variable
reference.  Won't hurt to give it a try though.  Thanks for the
feedback.

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 10:40 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Easy array question...


Are you using:

$array2 = $_SESSION["array1"];

Not sure that will do the trick, but it was my first inclination.

Rich

> -Original Message-
> From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2003 11:37 AM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] Easy array question...
> 
> 
>   I create an array on one page and then process it on 
> the next page
> as I have registered the array as a session variable.  I need 
> to basically
> process one of these arrays twice, so I want to make a copy 
> of the array.
> The question is how do I do this?  I have tried the following:
> 
> $array2 = $array1;
> 
>   This doesn't seem to do the trick for me.  Is this 
> correct and I am
> just missing something elsewhere, or is there another way to 
> copy an array?
> Thanks.
> 
> Scott Nipp
> Phone:  (214) 858-1289
> E-mail:  [EMAIL PROTECTED]
> Web:  http:\\ldsa.sbcld.sbc.com
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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

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



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



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



RE: [PHP-DB] Easy array question...

2003-03-12 Thread Jonathan Villa
$array_copy = array();
array_push($array_copy, $_SESSION['original_array']);

echo $array_copy[0];//or whatever to test

 
---> Jonathan
 
 
 
-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 10:43 AM
To: 'Hutchins, Richard'; '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Easy array question...

I don't think that is the case because I am able to access the
original array in this same page without having to use the session
variable
reference.  Won't hurt to give it a try though.  Thanks for the
feedback.

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 10:40 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Easy array question...


Are you using:

$array2 = $_SESSION["array1"];

Not sure that will do the trick, but it was my first inclination.

Rich

> -Original Message-
> From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2003 11:37 AM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] Easy array question...
> 
> 
>   I create an array on one page and then process it on 
> the next page
> as I have registered the array as a session variable.  I need 
> to basically
> process one of these arrays twice, so I want to make a copy 
> of the array.
> The question is how do I do this?  I have tried the following:
> 
> $array2 = $array1;
> 
>   This doesn't seem to do the trick for me.  Is this 
> correct and I am
> just missing something elsewhere, or is there another way to 
> copy an array?
> Thanks.
> 
> Scott Nipp
> Phone:  (214) 858-1289
> E-mail:  [EMAIL PROTECTED]
> Web:  http:\\ldsa.sbcld.sbc.com
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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

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



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



RE: [PHP-DB] Searchform to results.php

2003-03-07 Thread Jonathan Villa

"SELECT ..   FROM ".$_POST['searchtype'];

I'm not to sure if this is just for easy ready, but I haven't too many
instances where the query is in all caps.

Anyone, does case matter in a query?
 
---> Jonathan
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 07, 2003 12:32 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP-DB] Searchform to results.php 

I have a mysql database named DEALER with tables named by states.
My script displays all the data correctly if I manually inculde the FROM
"state name".I want to make a form to let someone choose the state and
run the query. I
have tried and failed can someone show me what I am doing wrong?My
searchform:


  Find a Dealer Search
  
Choose a State:

  OHIO
  ALABAMA

 
  



A snip from my results.php

 $display) { // Only show 1,2,3,etc. when there are
more records found that fit on 1 page// when the page is loaded
first...
if(empty($pagenr)) {
$pagenr = 1;
}
Would you please help me with my mistakes on line6



-- 
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] How to access a MS Access DB

2003-03-03 Thread Jonathan Villa
I believe I posted that thread.


Try odbc_exec instead of odbc_prepare

Let me know if have more problems
 
---> Jonathan
 
 
 

-Original Message-
From: Beverly Steiner [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 03, 2003 3:11 PM
To: [EMAIL PROTECTED]
Cc: Beverly Steiner
Subject: RE: [PHP-DB] How to access a MS Access DB

Hello,

I'm new to this list and saw a past discussion in mid-Feb. about how to
access an MS Access DB.  I have Apache and PHP installed on my PC
running XP
Professional.

I created a system DSN and got past the odbc_connect but it died in the
odbc_prepare statement.  Error message: Warning: odbc_prepare():
supplied
argument is not a valid ODBC-Link resource in c:\perl\htdocs\test2.php
on
line 20
cannot prepare result

Here's my code (w/username and password changed):

$connection = odbc_connect("mctadb", "username", "password") ||
die("cannot
open database");

$sql = "SELECT MeeetingTitle, MeetingDate FROM meeting;";

$sql_result = odbc_prepare($connection, $sql) || die("cannot prepare
result");

Any help would be greatly appreciated,

Beverly Steiner
[EMAIL PROTECTED]



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



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



RE: [PHP-DB] Help with a query

2003-03-03 Thread Jonathan Villa
2) Have you tried echoing the query to see exactly what is being passed
to
the RDBMS?  That is, perhaps session_id() or $customer_id is not giving
a
valid value.

Yes the values are all their.

I am using MySQL so I guess I will have to go a different route.

I'll have to run 2 queries which is what I wanted to avoid, but I guess
there's no other way

Thanks for the quick reply.  
 
---> Jonathan
 
 
 
-Original Message-
From: Paul Burney [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 03, 2003 10:06 AM
To: [EMAIL PROTECTED]; PHP Database List
Subject: Re: [PHP-DB] Help with a query

on 3/31/03 10:41 AM, Jonathan Villa at [EMAIL PROTECTED] appended
the
following bits to my mbox:

> I want to pull data from 2 tables but using a primary key from one.
> 
> Here is what I think it should look like.
> 
> SELECT item_id, subtotal, quantity from shopping_cart WHERE order_id =
> (SELECT order_id FROM orders WHERE session_id = session_id()) AND
> customer_id = $customer_id;

A few questions:

1) Are you sure your RDBMS supports sub-queries?  Most do, but MySQL
does
not.

2) Have you tried echoing the query to see exactly what is being passed
to
the RDBMS?  That is, perhaps session_id() or $customer_id is not giving
a
valid value.

3) Using the results of (2) above, have you input the query into another
RDBMS client (i.e., command line version) to see what kind of errors are
given.

HTH.

Sincerely,

Paul Burney
<http://paulburney.com/>






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



[PHP-DB] Help with a query

2003-03-03 Thread Jonathan Villa

I can't figure this query out.

I want to pull data from 2 tables but using a primary key from one.

Here is what I think it should look like.

SELECT item_id, subtotal, quantity from shopping_cart WHERE order_id =
(SELECT order_id FROM orders WHERE session_id = session_id()) AND
customer_id = $customer_id;

-Jonathan




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



RE: [PHP-DB] Customer id

2003-02-28 Thread Jonathan Villa
Create a customer_id field in the database, make it primary, int, and
autoincrement

 
---> Jonathan
 
 
 

-Original Message-
From: Dan Kelly [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 28, 2003 6:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Customer id

How do I write a script that will automatically create an ID in the 
database. Here is a sample

-- orderform.shtml 


First Name
Last Name




--Order.php 
--

Any Ideas? Thanks, Dan



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

2003-02-28 Thread Jonathan Villa

Ok, maybe this is strictly a phpMyAdmin Q, but I'm sure many of use it
=)

I have a server at home which runs phpMyAdmin.
I also run it locally on my laptop.  The cfg_uri for both is
http://localhost/phpMyAdmin/

When I open a web browser (IE), I go to
http://mydomainonmyserverathome/phpMyAdmin
Then when I try to work with my database at home.

All of a sudden, it acts as if I were trying to work on the db which is
on my laptop.

So here are my steps:

1.  go to http://mydomainonmyserverathome/phpMyAdmin
2.  Try to create a table which exists on my laptop but not on my
server at home
3.  Get message that table already exists
4.  view list of tables on the left nav and they contain all the
db's which are on my laptop.


Help please!!!



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



RE: [PHP-DB] Storing an array in the database

2003-02-28 Thread Jonathan Villa
Thanks!

I checked out the php docs, 

serialize() returns a string containing a byte-stream representation of
value that can be stored anywhere.

Perfect!

 
---> Jonathan
 
 
 
-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 28, 2003 10:43 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Storing an array in the database

> How would I store an array in the database?  I want to store 2 things.
> One array of shirt sizes and one array of which holds other arrays.

Easy.



  $singleDimArray = array( 1, 2, 3, 4, 5 );
  $multiDimArray   = array( array( "this" => "that", "here" => "there"
),
array( "near" => "far", "wherever" => "you
are" )); // hehe

  $query = "INSERT INTO table
 ( field1, field2 )
 VALUES
 ( \"" . serialize( $singleDimArray ) . "\", \"" .
serialize( $multiDimArray ) . "\" )";

  $result = mysql_query( $query );
  
  $selectQuery = "SELECT * FROM table";
  $result = mysql_query( $selectQuery );
  
  $fetchedRecord = mysql_fetch_assoc( $result );
  
  $singleDimArray = unserialize( $fetchedRecord['field1'] );
  $multiDimArray  = unserialize( $fetchedRecord['field2'] );
  


serialize() is your friend when it comes to storing arrays in
a DB field.

Chris



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



[PHP-DB] Storing an array in the database

2003-02-28 Thread Jonathan Villa

How would I store an array in the database?  I want to store 2 things.
One array of shirt sizes and one array of which holds other arrays.


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



RE: [PHP-DB] Processing Page

2003-02-27 Thread Jonathan Villa
Timeout.html will redirect to verify_process.php after 30 seconds
On verify_process.php you could run another query which would check the
status of a certain field in the db. If this field is set to xxx, then
redirect back to timeout.html, else redirect to process_complete.php.

I guess this would work if you could set the field being used as a point
of a reference when the other process is running.

 ???

---> Jonathan
 
 
 

-Original Message-
From: Aspire Something [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 2:56 PM
To: php-db
Subject: Re: [PHP-DB] Processing Page

Thanks every one ...

All the method you told me are static it does not look if the sql
statemet
being exec by php along with backend has finished its job . I only
wanted to
show the processig page till the time the query does it's work .

let me add here that the time for execution of  the script here is
unpridictable and it is expected that it may vary according to the job
given
thus
 I cannot hardcode the refresh time .

Regads,
V Kashyap

- Original Message -
From: "Jonathan Villa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "'Aspire Something'"
<[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, February 28, 2003 1:43 AM
Subject: RE: [PHP-DB] Processing Page


> http://yourpagehere";>
>
> 5 = time to wait
>
>
> ---> Jonathan
>
>
>
>
> -Original Message-
> From: Jonathan Villa [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 27, 2003 2:10 PM
> To: 'Aspire Something'; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Processing Page
>
> You could do this very easily using a HTML page with the correct META
> tags.
>
> I am working on a Domino Project right now that does just that.
>
> After a page is submitted, the user is directed to an html page which
> sits for about 45 seconds.  This HTML page just says something like
> "Your information is being processed by the State of XXX, please hold"
> or something like it.  Then the page is redirected to a result page.
>
> I have also done this before:
>
> Thrown in a javascript redirect which took effect after 30 seconds.
> This page had an animated gif on similar to the startup gif on WinXP
>
>
> ---> Jonathan
>
>
>
>
> -Original Message-
> From: Aspire Something [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 27, 2003 1:49 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Processing Page
>
> Hi all,
>
> Permit me to recive your valuable knowledge ,
>
> We are working on a project where the backend churns data for about 1
> Minute (time out limit is  2 min) we would like
> to put a page like
>  PROCESSING 
> during the database is busy doing its fine job. And also a sucess page
> appears when the
> process is sucessfull.
>
> Please if you have any idea how it can be done please let me
> Humble thanks in advance.
> We are not using persist connection to postgresql
> === My Sys Looks as ==
> Red Hat 7.2 Kernel  2.4.7-10,
> PHP 4.3.0,
> GCC 3.02,
> Apache 1.3.27 ,
> Postgresql 7.3.2,
> Intel arch i686.
> 
>
>
> Regards,
> Aspire
>
>
> --
> 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] Re: Processing Page

2003-02-27 Thread Jonathan Villa
Oops, I sent my message without finishing it (that's what I get for
having to many windows open).

I think your #2 option would work.  It's very similar to what I have
done in the pass . I forgot exactly how I did it, I would have to look
in my archives, but I'm pretty sure it was something like that,  I know
it involved 3 pages

1. please hold page
2. page to verify the status of the process, then redirect to #1 or else
#2
3. final result
---> Jonathan
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Fredrik de Vibe
Sent: Thursday, February 27, 2003 2:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Processing Page

[EMAIL PROTECTED] (Aspire Something) writes:
> We are working on a project where the backend churns data for about
> 1 Minute (time out limit is 2 min) we would like to put a page like
>  PROCESSING  
> during the database is busy doing its fine job. And also a sucess
> page appears when the process is sucessfull.
> Please if you have any idea how it can be done please let me 

Since a client never can talk to a server with html pages this is
afaik not really possible. You'd have to use something like a java
applet, flash or something else that is able to talk to a server.

However, you could maybe work around it in some ways, I haven't tested
these, but I guess they should work to some extent:

1. Simple. Just make a page which reloads the "target" page after one
   minute. This, however, might be problematic if the work takes
   longer than one minute and would create needless waiting time if
   the work is processed quicker.

2. More or less the same as (1), but a little more sophisticated. Send
   a page that loads itself every five or ten seconds. For each
   reload, test if the work has been done, if not send the same page,
   otherwise, send a "success" page or whatever.

Others may have better solutions, and there could be problems with
these that I haven't thought of, but at least they're suggestions ;-)


-- 
--Fredrik
If God is dead, who will save the Queen?

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



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



RE: [PHP-DB] Re: Processing Page

2003-02-27 Thread Jonathan Villa
I guess I was thinking of a "success only" scenario.  If the backend
never failed, then an easy Meta redirect would work, (if given enough
time to process).

However, in the "real world", assuming success is a foolish mistake.  

 
---> Jonathan
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Fredrik de Vibe
Sent: Thursday, February 27, 2003 2:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Processing Page

[EMAIL PROTECTED] (Aspire Something) writes:
> We are working on a project where the backend churns data for about
> 1 Minute (time out limit is 2 min) we would like to put a page like
>  PROCESSING  
> during the database is busy doing its fine job. And also a sucess
> page appears when the process is sucessfull.
> Please if you have any idea how it can be done please let me 

Since a client never can talk to a server with html pages this is
afaik not really possible. You'd have to use something like a java
applet, flash or something else that is able to talk to a server.

However, you could maybe work around it in some ways, I haven't tested
these, but I guess they should work to some extent:

1. Simple. Just make a page which reloads the "target" page after one
   minute. This, however, might be problematic if the work takes
   longer than one minute and would create needless waiting time if
   the work is processed quicker.

2. More or less the same as (1), but a little more sophisticated. Send
   a page that loads itself every five or ten seconds. For each
   reload, test if the work has been done, if not send the same page,
   otherwise, send a "success" page or whatever.

Others may have better solutions, and there could be problems with
these that I haven't thought of, but at least they're suggestions ;-)


-- 
--Fredrik
If God is dead, who will save the Queen?

-- 
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] Processing Page

2003-02-27 Thread Jonathan Villa
http://yourpagehere";>

5 = time to wait

 
---> Jonathan
 
 
 

-Original Message-
From: John A DAVIS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 2:23 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Processing Page

What are the correct META tags? I could use this functionality too.



>>> [EMAIL PROTECTED] 02/27/03 12:10PM >>>
You could do this very easily using a HTML page with the correct META
tags.

I am working on a Domino Project right now that does just that.

After a page is submitted, the user is directed to an html page which
sits for about 45 seconds.  This HTML page just says something like
"Your information is being processed by the State of XXX, please hold"
or something like it.  Then the page is redirected to a result page.

I have also done this before:

Thrown in a javascript redirect which took effect after 30 seconds.
This page had an animated gif on similar to the startup gif on WinXP

 
---> Jonathan
 
 
 

-Original Message-
From: Aspire Something [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 1:49 PM
To: [EMAIL PROTECTED] 
Subject: [PHP-DB] Processing Page

Hi all,

Permit me to recive your valuable knowledge ,

We are working on a project where the backend churns data for about 1
Minute (time out limit is  2 min) we would like 
to put a page like
 PROCESSING  
during the database is busy doing its fine job. And also a sucess page
appears when the 
process is sucessfull.

Please if you have any idea how it can be done please let me 
Humble thanks in advance.
We are not using persist connection to postgresql
=== My Sys Looks as ==
Red Hat 7.2 Kernel  2.4.7-10,
PHP 4.3.0,
GCC 3.02,
Apache 1.3.27 ,
Postgresql 7.3.2,
Intel arch i686.



Regards,
Aspire


-- 
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] Processing Page

2003-02-27 Thread Jonathan Villa
http://yourpagehere";>

5 = time to wait

 
---> Jonathan
 
 
 

-Original Message-
From: Jonathan Villa [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 2:10 PM
To: 'Aspire Something'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Processing Page

You could do this very easily using a HTML page with the correct META
tags.

I am working on a Domino Project right now that does just that.

After a page is submitted, the user is directed to an html page which
sits for about 45 seconds.  This HTML page just says something like
"Your information is being processed by the State of XXX, please hold"
or something like it.  Then the page is redirected to a result page.

I have also done this before:

Thrown in a javascript redirect which took effect after 30 seconds.
This page had an animated gif on similar to the startup gif on WinXP

 
---> Jonathan
 
 
 

-Original Message-
From: Aspire Something [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 1:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Processing Page

Hi all,

Permit me to recive your valuable knowledge ,

We are working on a project where the backend churns data for about 1
Minute (time out limit is  2 min) we would like 
to put a page like
 PROCESSING  
during the database is busy doing its fine job. And also a sucess page
appears when the 
process is sucessfull.

Please if you have any idea how it can be done please let me 
Humble thanks in advance.
We are not using persist connection to postgresql
=== My Sys Looks as ==
Red Hat 7.2 Kernel  2.4.7-10,
PHP 4.3.0,
GCC 3.02,
Apache 1.3.27 ,
Postgresql 7.3.2,
Intel arch i686.



Regards,
Aspire


-- 
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] Processing Page

2003-02-27 Thread Jonathan Villa
You could do this very easily using a HTML page with the correct META
tags.

I am working on a Domino Project right now that does just that.

After a page is submitted, the user is directed to an html page which
sits for about 45 seconds.  This HTML page just says something like
"Your information is being processed by the State of XXX, please hold"
or something like it.  Then the page is redirected to a result page.

I have also done this before:

Thrown in a javascript redirect which took effect after 30 seconds.
This page had an animated gif on similar to the startup gif on WinXP

 
---> Jonathan
 
 
 

-Original Message-
From: Aspire Something [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 1:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Processing Page

Hi all,

Permit me to recive your valuable knowledge ,

We are working on a project where the backend churns data for about 1
Minute (time out limit is  2 min) we would like 
to put a page like
 PROCESSING  
during the database is busy doing its fine job. And also a sucess page
appears when the 
process is sucessfull.

Please if you have any idea how it can be done please let me 
Humble thanks in advance.
We are not using persist connection to postgresql
=== My Sys Looks as ==
Red Hat 7.2 Kernel  2.4.7-10,
PHP 4.3.0,
GCC 3.02,
Apache 1.3.27 ,
Postgresql 7.3.2,
Intel arch i686.



Regards,
Aspire


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



RE: [PHP-DB] Get MySQL table schema for a dump

2003-02-27 Thread Jonathan Villa
I never thought of mysql_fetch_row.

What I ended up using was 

$row = mysql_fetch_array($result_id);
echo $row[1];

I'll probably use fetch_row as it makes more sense.

Thanks. 


 
---> Jonathan
 
 
 

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 11:14 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Get MySQL table schema for a dump

> Ok, that works great.  Now, what is the best way to echo the result.

Just like the result from any other query. The query returns a result of
one row and one column.

> For example
> 
> $connection = mysql_connect("localhost","u","p");
> mysql_select_db("killerspin_com", $connection);
> $sql = "SHOW CREATE TABLE update_list";
> $result_id = mysql_query($sql,$connection);
> 
> then what,
> 
> if (mysql_num_rows($res...))
>   ???
> or
> 
> while ($rows = mysql_fetch_array()...)
>   

There's only one row...

$row = mysql_fetch_row($result_id);
echo $row[0];

or

echo mysql_result($result_id,0);

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/




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



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



Re: [PHP-DB] php-dbase on RedHat 8.0

2003-02-27 Thread Jonathan Villa
That's odd.  I haven't tried 4.3.1, but I do have 4.3.0 running on 
apache 2.0.44.  I'll try 4.3.1 today and see if I come across anything.



At Thursday, 27 February 2003, Roger Boily <[EMAIL PROTECTED]> wrote:

>Hi,
>I have upgrated to RedHat 8.0 that unfortunatly "downgrade" my working 
>php 4.3.1 to 4.2.2
>with an upgrate from Apache 1.3 to 2.0.
>My problem is that I can no more make the php-dbase library works 
fine. 
>It seems that
>there is no way to find the good version dbase.so file (php-dbase-
4.2.2 
>for i386) since
>RedHat does not provide it anymore. Is there a way to make it work?
>NB: I tried to upgrate again to php-4.3.1 but I always get errors 
while 
>"making".
>Thanks in advance.
>Roger
>
>-- 
>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] Get MySQL table schema for a dump

2003-02-26 Thread Jonathan Villa
Ok, that works great.  Now, what is the best way to echo the result.

For example

$connection = mysql_connect("localhost","u","p");
mysql_select_db("killerspin_com", $connection);
$sql = "SHOW CREATE TABLE update_list";
$result_id = mysql_query($sql,$connection);

then what, 

if (mysql_num_rows($res...))
???
or

while ($rows = mysql_fetch_array()...)



 
---> Jonathan
 
 
 
-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 26, 2003 9:49 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Get MySQL table schema for a dump

> Is there was to get a database's table schema?
> 
> For example, I want to be able to click on a link and then create a
.txt
> file of a table (or even better a databases) schema.
> 
> So far, I have a simple function which will output
> 
> INSERT INTO table (x,x,x,) VALUES(x,x,x);
> INSERT INTO table (x,x,x,) VALUES(x,x,x);
> INSERT INTO table (x,x,x,) VALUES(x,x,x);
> INSERT INTO table (x,x,x,) VALUES(x,x,x);
> etc.
> 
> but what I'm missing is
> 
> CREATE table blah, blah, blah
> 
> **that is what I want to get.

SHOW CREATE TABLE ;

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/




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



RE: [PHP-DB] Re: Get MySQL table schema for a dump

2003-02-26 Thread Jonathan Villa
Sorry, I should have explained that I want to do this via PHP.

 
---> Jonathan
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Fredrik de Vibe
Sent: Wednesday, February 26, 2003 5:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Get MySQL table schema for a dump

[EMAIL PROTECTED] (Jonathan Villa) writes:
> Is there was to get a database's table schema?

I don't think it's called schemas in mysql, but I'm not sure :-)

> So far, I have a simple function which will output 
> INSERT INTO table (x,x,x,) VALUES(x,x,x);
> [ ... ]
> but what I'm missing is 
> CREATE table blah, blah, blah

mysqldump is the tool you need.

e.g.
  $ mysqldump -u user [-p] Database > db_dump_file.sql

man mysqldump for more info.


-- 
--Fredrik
If God is dead, who will save the Queen?

-- 
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] Get MySQL table schema for a dump

2003-02-26 Thread Jonathan Villa
Is there was to get a database's table schema?

For example, I want to be able to click on a link and then create a .txt
file of a table (or even better a databases) schema.

So far, I have a simple function which will output 

INSERT INTO table (x,x,x,) VALUES(x,x,x);
INSERT INTO table (x,x,x,) VALUES(x,x,x);
INSERT INTO table (x,x,x,) VALUES(x,x,x);
INSERT INTO table (x,x,x,) VALUES(x,x,x);
etc.

but what I'm missing is 

CREATE table blah, blah, blah

**that is what I want to get.

-Jonathan




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



[PHP-DB] RE: your odbc problem can be solved

2003-02-14 Thread Jonathan Villa
Great, the error message is gone so I am assuming that it have it right
so far.

Now, my question is on syntax and logic.  I have a RecordSet class I use
when I connection to a MySQL.  It's basically like this:

class RecordSet
{
//var name  

function RecordSet($sql)
{
$this->setDBConn(mysql_connect("localhost",
"username", "password"));
mysql_select_db($this->getDBName(),
$this->getDBConn());
$this->setResultID(mysql_query($sql,
$this->getDBConn()));
}

//Appropriate Gets and Sets
}

I then do something like this

$objRecordSet = new RecordSet($sql);
if (mysql_num_rows($objRecordSet->getResultID()) != 1)
{
blah blah blah
}

I want to do the same with the ODBC functions.  So basically, just be
able to create a new RecordSet class and pass it a query.  


I'm pretty hard pressed for time and have not found the "right" info on
the web which is why I am asking what I am asking.

Thanks in advance. 

---> Jonathan
 
 
 

-Original Message-
From: John A DAVIS [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 14, 2003 10:45 AM
To: [EMAIL PROTECTED]
Subject: your odbc problem can be solved

That's fine, but you need to do this on the machine that has the web
server, even if it's pointing at another machine that has the database.
Why? Because the "web server" is the one trying to access the database
with an ODBC driver (Open Database Connectivity), not the user.

For some reason, my answer wasn't posted yesterday.




Ok, this is what I did...

Keep in mind I have Xp so I don't know how this all pans out.

1. I opened the ODBC Data Source Administrator
2. My default view was User DSN
3. I clicked on System DSN
4. Clicked on Add
5. Choose Microsoft Access Driver (*.mdb)
6. Gave it a name of Killerspin_com2
7. Clicked on Create 
8. Saved it the directory which my source code will reside in.
9. Set up username/password
10. created test_connect.php page.
11. Inserted the following code:

if (odbc_connect("killerspin_com","username","password") == 0)
die("failed");
else
die("success");

12. Received this error.

Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name
not found and no default driver specified, SQL state IM002 in SQLConnect
in D:\is\clients\eki\killer_spin\new_web\test_connect.php on line 3
Failed.

I'm not to sure how to set this up to work with PHP
 
---> Jonathan
 
 
 

-Original Message-
From: Griffiths, Daniel [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 14, 2003 3:38 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
Subject: RE: [PHP-DB] How to access a MS Access DB 

to set up a DSN go to control panel and then Administrative Tools then
into Data Sources and then add a new system DSN.
you can probably work the rest out as its fairly straight forward.

-Original Message-
From: Jonathan Villa [mailto:[EMAIL PROTECTED]] 
Sent: 13 February 2003 22:48
To: [EMAIL PROTECTED] 
Subject: [PHP-DB] How to access a MS Access DB 



I need to know exactly how to hook up to an Access database under Office
Xp.  I normally use MySQL, but the current site sits on Windows servers.

I am using php 4.3.0
Office Xp Pro w/ Access
I'm running Apache 2.0.43

I need to know how to check if ODBC is set up on my machine (I hear that
by default it is) and what's this about a driver?

All I know at this point is 

odbc_connect("XXX","username","password");

Where XX is the DSN name I will be using, (how do this, i.e. set up a
DSN name)

Thanks much and in advance.



-- 
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] How to access a MS Access DB

2003-02-14 Thread Jonathan Villa
Ok, this is what I did...

Keep in mind I have Xp so I don't know how this all pans out.

1. I opened the ODBC Data Source Administrator
2. My default view was User DSN
3. I clicked on System DSN
4. Clicked on Add
5. Choose Microsoft Access Driver (*.mdb)
6. Gave it a name of Killerspin_com2
7. Clicked on Create 
8. Saved it the directory which my source code will reside in.
9. Set up username/password
10. created test_connect.php page.
11. Inserted the following code:

if (odbc_connect("killerspin_com","username","password") == 0)
die("failed");
else
die("success");

12. Received this error.

Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name
not found and no default driver specified, SQL state IM002 in SQLConnect
in D:\is\clients\eki\killer_spin\new_web\test_connect.php on line 3
Failed.

I'm not to sure how to set this up to work with PHP
 
---> Jonathan
 
 
 

-Original Message-
From: Griffiths, Daniel [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 14, 2003 3:38 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] How to access a MS Access DB 

to set up a DSN go to control panel and then Administrative Tools then
into Data Sources and then add a new system DSN.
you can probably work the rest out as its fairly straight forward.

-Original Message-
From: Jonathan Villa [mailto:[EMAIL PROTECTED]]
Sent: 13 February 2003 22:48
To: [EMAIL PROTECTED]
Subject: [PHP-DB] How to access a MS Access DB 



I need to know exactly how to hook up to an Access database under Office
Xp.  I normally use MySQL, but the current site sits on Windows servers.

I am using php 4.3.0
Office Xp Pro w/ Access
I'm running Apache 2.0.43

I need to know how to check if ODBC is set up on my machine (I hear that
by default it is) and what's this about a driver?

All I know at this point is 

odbc_connect("XXX","username","password");

Where XX is the DSN name I will be using, (how do this, i.e. set up a
DSN name)

Thanks much and in advance.



-- 
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] How to access a MS Access DB

2003-02-13 Thread Jonathan Villa

I need to know exactly how to hook up to an Access database under Office
Xp.  I normally use MySQL, but the current site sits on Windows servers.

I am using php 4.3.0
Office Xp Pro w/ Access
I'm running Apache 2.0.43

I need to know how to check if ODBC is set up on my machine (I hear that
by default it is) and what's this about a driver?

All I know at this point is 

odbc_connect("XXX","username","password");

Where XX is the DSN name I will be using, (how do this, i.e. set up a
DSN name)

Thanks much and in advance.



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