RE: [PHP-DB] Auto load PHP

2001-04-02 Thread David Balatero

Maybe after the UPDATE statement, you could do:



...but I don't know, I don't use header() that much.


-- David Balatero

-Original Message-
From: Jim Ray [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 6:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Auto load PHP


Is there a way, once updating a table to load another PHP? After, I have the
user click on the save button, the code calls a update routine. After the
UPDATE is done, I want the code to call another progam.


Thank you.

Jim



--
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] metabase support

2001-04-02 Thread Joe Brown

I am a little less biased ;-)

I think Manuel's Metabase is the bomb.  Unfortunatly, so does Windows...

Metabase provides some truely wonderful features.  On Windows, Metabase with
OCI8 my server keep performing illegeal instructions.  I think this is a
lack of PHP's maturity on Win32,  not Metabase's fault.

On linux, web pages work wonderfuly with Metabase.  Needing to support a
Windows Server, so I'm working on going back and yanking out Metabase.  This
is where I am learning that Metabase really is nice.  OCI* functions by
themself are not nearly as convenient as Metabase functions.  I expect this
is true of most databases and PHP.

Kudos Manuel!

There is a bit of a learning curve with Metabase, but the curve exists for
all the independent database functions as well.  Tempted to use PEAR
implementation, but fear it Would suffer the same dilemma as Metabase on
Windows and it's not nearly as mature as Metabase.

-Joe


- Original Message -
From: ""Dean Hall"" <[EMAIL PROTECTED]>
Newsgroups: php.db
Sent: Monday, April 02, 2001 1:36 AM
Subject: Re: [PHP-DB] metabase support


>
> ""Manuel Lemos"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > >I just want to make sure that I'm understanding what metabase supports.
> >
> > >It does not support:
> > >- references
> > >- primary keys
> >
> > >Does anyone find that this prevents you from using metabase? Or do you
> find
> > >that you have to hack your way around these deficiencies?
> >
> > You can live perfectly well without both.
> >
> > In practice primary keys are not much more than declaring a unique index
> on
> > the key fields.
> >
> > References or foreign keys have a role of assuring database integrity.
> > This means that if you update your database tables and not assure that
> > specified references exist consistently, the DBMS will fail on those
> > updates.
> >
> > It's not like it will avoid your application bugs, but at least if your
> > application has a bug that would break the database integrity, well
placed
> > references/foreign keys will prevent that to happen.  Your application
> will
> > just stop working until you fix the bugs.
> >
> > >I use MySQL most of the time, so I've learned to design without
explicit
> > >references, but I'd like to have the opportunity to at least specify
> > >references in the schema definition (which MySQL allows but doesn't do
> > >anything with). It seems that with a DBMS-independent abstraction layer
> like
> > >metabase something like this should be supported.
> >
> > Support for primary/foreign keys is in my to do list.  It just did not
> > become a priority because there are other things more important to add
> like
> > BLOBs.
> >
> > Metabase is about to go Open Source.  I am just waiting to finish a
great
> > design tool before I announce when Metabase will be open for other
> > developers to contribute with work that I can't do right away.
> >
> > Anyway, that should not stop you from using Metabase as it is.  Metabase
> is
> > the only PHP database abstraction package that does schema management.
> You
> > can live without schema management, but it provides great schema
> > maintenance aid.
> >
> > When support for primary/foreign keys is added explicitly you will be
able
> > to upgrade your schemas without worry.  So, you can use Metabase with
> > schema management as it is now.
> >
> >
> > Regards,
> > Manuel Lemos
>
> Thanks for your comments, Manuel. I will consider them. However, I was
> wondering if anyone else who is less biased :-) wanted to comment on my
> questions.
>
> Thanks.
> Dean Hall.
>
>
>
> --
> 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] Validating forms

2001-04-02 Thread Phil Jackson

Julio,

It is much more efficient to do that type of validation client-side, using
Javascript.  No
sense in making another round trip to the server if not necessary.

Here is a quicke example:
  if (document.autoform.txtVehicleNumber.value == ""){
  document.autoform.txtVehicleNumber.focus()
  alert("Enter fleet vehicle number")
  return false
}

Have a look at http://www.wsabstract.com/ for good javascript info.

good luck,

Phil J.

"Julio Cuz, Jr." wrote:

> Hi--
>
> I have a form that cannot have a specific field blank, so I would like to
> add a message box saying "fill out the x field," is there a way to do this
> WITHOUT having to refresh the page?
>
> Julio Cuz, Jr.
> Riverside Community College
> [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] PHP4.0.4 segfaults with odbc_pconnect

2001-04-02 Thread Andrew Hill

Daevid,


connection script snipped (looked fine)

> $dsn="DSN=OpenLink"; // this is a valid DSN set up in the above odbc.ini

> //$conn_id = odbc_connect("DSN=OpenLink;UID=daevid;PWD=secret","","");
> ?>
> --
> 
> [OpenLink]
> Driver  = /usr/local/openlink/lib/oplodbc.so.1
> Description = Sample OpenLink DSN
> Host= 10.2.3.11
> ServerType  = Oracle 8.1.x
> FetchBufferSize = 99
> UserName= daevid
> Password= secret
> Database= mydatabase
> ServerOptions   =
> ConnectOptions  =
> Options =
> ReadOnly= yes
> Trace   = 0
> TraceFile   = /tmp/iodbc.trace
> 
> [Default]
> Driver = /usr/local/openlink/lib/oplodbc.so.1
> 
> Is "ServerType = Oracle 8.1.x" right?
> I'm trying to connect to a MS SQL2000 server on a Win2k box:

No, that is just a sample DSN - you will want to edit it to match your
configureation or add an additional one wiht server type SQLServer 2000
Database is the sqlserver catalog, e.g. northwind, pubs, or yours.

When adding a DSN, add a matching section at the top as well:

[ODBC Data Sources]
OpenLink   = OpenLink Generic ODBC Driver //o
SQLServer2k

[SQLServer2k]
Driver  = /usr/local/openlink/lib/oplodbc.so.1
Host= 10.2.3.11
FetchBufferSize = 99
ServerType  = SQLServer2000
UserName= daevid
Password= secret
Database= mydatabase

You can add the other options as you see fit, or even override these by
setting the RulesBook on the server side.

Everything else looks fine.

This assumes you have the server-side components of our Multi-Tier driver
installed on the SQLServer box.  It might be wise to add a DSN on the server
using the OpenLink driver, to test you have the server-side components
installed properly.

If you've not yet installed them, the SQLServer agent / Request Broker
components are at: http://www.openlinksw.com/software/open40/ntadmzzz.zip

Checking the docs out for configuring OpenLink Drivers might not hurt
either, and might have saved you time setting up your initial connection:
http://www.openlinksw.com/info/docs/rel4doc/index.html
> 
> [root=pts/2]7:35pm@content:{/usr/local/openlink/bin}> cat odbcinst.ini
> [ODBC Drivers]
> OpenLink Generic ODBC Driver = Installed
> 
> [OpenLink Generic ODBC Driver]
> Driver = /usr/local/openlink/lib/oplodbc.so.1
> Setup  = /usr/local/openlink/lib/oplodbc.so.1
> 
> [root=pts/2]7:35pm@content:{/usr/local/openlink/bin}> ./odbctest
> OpenLink ODBC Demonstration program
> This program shows an interactive SQL processor
> 
> Enter ODBC connect string (? shows list): ?
> 
> DSN| Description
> ---
> OpenLink   | OpenLink (MT)
> 
> Enter ODBC connect string (? shows list): OpenLink
> [iODBC][Driver Manager]Dialog failed, SQLSTATE=IM008

Syntax problem here - odbctest takes the argument "DSN=DSN_Name", not just
the DSN_Name
> 
> Have a nice day.
> 

You obviously have the ODBCINI set properly in the environmnet, or odbctest
wouldn't show your DSNs.

So fix the ServerType, ensure working server-side components, and change
your connection syntax for odbctest - you actually are just about there.

Let me know if you need additional assistance.

Best regards,
Andrew
---
Andrew Hill - OpenLink Software
Director Technology Evangelism
eBusiness Infrastructure Technology
http://www.openlinksw.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-DB] PHP4.0.4 segfaults with odbc_pconnect

2001-04-02 Thread Daevid Vincent

I've tried this with both PHP4.0.4 and PHP4.0.4pl1 as a module (it's for a
daily script eventually).

[root=pts/1]7:29pm@content:{/www/html/private/TattooShop}>
./odbc-test2.phtml
#!/bin/php -q
Segmentation fault

the relevant part of phpinfo(); is below, so I'm assuming that I finally got
odbc compiled into it:

Configure Command './configure' '--with-iodbc=/usr/local/openlink/odbcsdk'
'--with-mysql=/usr/local' '--with-config-file-path=/etc'
ODBC
ODBC libraryiodbc
odbc.allow_persistent   On
odbc.check_persistent   On
odbc.default_db no value
odbc.default_pw
odbc.default_user   no value
odbc.defaultbinmode return as is
odbc.defaultlrl return up to 4096 bytes
odbc.max_links  Unlimited
odbc.max_persistent Unlimited


here is the actual "odbc-test2.phtml" script, which is basically the one in
the iODBC PHP install example:
Commented lines are one's I've tried too with the same or worse results.
Commenting out the odbc_* line(s) doesn't segfault, but then again, it's a
useless script at that point too ;-)
--
#!/bin/php -q

--

and here is the directory structure:
[root=pts/2]7:33pm@content:{/usr/src/WT_Apache_Setup/php}> l
/usr/local/openlink/odbcsdk/lib
total 976
-rw-r--r--1 openlink openlink   143692 Mar  7 14:42 libiodbc.a
-rwxr-xr-x1 openlink openlink  669 Mar  7 14:42 libiodbc.la*
lrwxrwxrwx1 openlink openlink   17 Mar 30 15:16 libiodbc.so ->
libiodbc.so.2.1.2*
lrwxrwxrwx1 openlink openlink   17 Mar 30 15:16 libiodbc.so.2 ->
libiodbc.so.2.1.2*
-rwxr-xr-x1 openlink openlink   117877 Mar  7 14:42 libiodbc.so.2.1.2*
-rw-r--r--1 openlink openlink   431992 Mar  7 14:42 oplodbc.a
-rw-r--r--1 openlink openlink  678 Mar  7 14:42 oplodbc.la
lrwxrwxrwx1 openlink openlink   16 Mar 30 15:16 oplodbc.so ->
oplodbc.so.1.0.0
lrwxrwxrwx1 openlink openlink   16 Mar 30 15:16 oplodbc.so.1 ->
oplodbc.so.1.0.0
-rw-r--r--1 openlink openlink   272057 Mar  7 14:42 oplodbc.so.1.0.0
[root=pts/2]7:33pm@content:{/usr/src/WT_Apache_Setup/php}> l
/usr/local/openlink/lib
total 400
-rwxr-xr-x1 openlink openlink  669 Mar  7 14:43 libiodbc.la*
lrwxrwxrwx1 openlink openlink   17 Mar 30 15:16 libiodbc.so ->
libiodbc.so.2.1.2*
lrwxrwxrwx1 openlink openlink   17 Mar 30 15:16 libiodbc.so.2 ->
libiodbc.so.2.1.2*
-rwxr-xr-x1 openlink openlink   117877 Mar  7 14:43 libiodbc.so.2.1.2*
lrwxrwxrwx1 openlink openlink   17 Mar 30 15:16 libodbc.so ->
libiodbc.so.2.1.2*
-rw-r--r--1 openlink openlink  678 Mar  7 14:43 oplodbc.la
lrwxrwxrwx1 openlink openlink   16 Mar 30 15:16 oplodbc.so ->
oplodbc.so.1.0.0
lrwxrwxrwx1 openlink openlink   16 Mar 30 15:16 oplodbc.so.1 ->
oplodbc.so.1.0.0
-rw-r--r--1 openlink openlink   272057 Mar  7 14:43 oplodbc.so.1.0.0
[root=pts/2]7:33pm@content:{/usr/src/WT_Apache_Setup/php}> l
/usr/local/openlink/bin/
total 136
-rwxr--r--1 openlink openlink23260 Mar  7 14:43 inifile*
-rw-rw-rw-1 openlink openlink  521 Apr  2 18:15 odbc.ini
-rw-r--r--1 openlink openlink  473 Mar  7 14:43 odbc.ini.sample
-rw-rw-rw-1 openlink openlink  180 Mar 29 20:21 odbcinst.ini
-rw-r--r--1 openlink openlink  170 Mar  7 14:43 odbcinst.ini.sample
-rwxr-xr-x1 openlink openlink92225 Mar  7 14:43 odbctest*
-rw-rw-rw-1 openlink openlink0 Mar 29 20:20 oplrqb.ini

here is some other useful info:

[root=pts/2]7:35pm@content:{/usr/local/openlink/bin}> cat odbc.ini
[ODBC Data Sources]
OpenLink   = OpenLink Generic ODBC Driver

[OpenLink]
Driver  = /usr/local/openlink/lib/oplodbc.so.1
Description = Sample OpenLink DSN
Host= 10.2.3.11
ServerType  = Oracle 8.1.x
FetchBufferSize = 99
UserName= daevid
Password= secret
Database= mydatabase
ServerOptions   =
ConnectOptions  =
Options =
ReadOnly= yes
Trace   = 0
TraceFile   = /tmp/iodbc.trace

[Default]
Driver = /usr/local/openlink/lib/oplodbc.so.1

Is "ServerType = Oracle 8.1.x" right?
I'm trying to connect to a MS SQL2000 server on a Win2k box:

[root=pts/2]7:35pm@content:{/usr/local/openlink/bin}> cat odbcinst.ini
[ODBC Drivers]
OpenLink Generic ODBC Driver = Installed

[OpenLink Generic ODBC Driver]
Driver = /usr/local/openlink/lib/oplodbc.so.1
Setup  = /usr/local/openlink/lib/oplodbc.so.1

[root=pts/2]7:35pm@content:{/usr/local/openlink/bin}> ./odbctest
OpenLink ODBC Demonstration program
This program shows an interactive SQL processor

Enter ODBC connect string (? shows list): ?

DSN

[PHP-DB] Auto load PHP

2001-04-02 Thread Jim Ray

Is there a way, once updating a table to load another PHP? After, I have the
user click on the save button, the code calls a update routine. After the
UPDATE is done, I want the code to call another progam.


Thank you.

Jim



-- 
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] How to limit a WHILE statement?

2001-04-02 Thread Brian Hardwick

Your might want to consider limiting the records selected.  For example
"select emp_name from employees limit 0,20".

Alternatively consider using a a "for" statement.

- Brian Hardwick
Tangible Networks.

-Original Message-
From: Bob Stone [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 6:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] How to limit a WHILE statement?


Dear PHP Helpers,

What is your recommendation on limiting a while
statement so that it only iterates a maximum of 20
times?

Here is the code snippet:

$result = mysql_query($sql, $db);

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

printf("Name: %s
%s %s %s\n", $myrow["salutation"],
$myrow["first_name"], $myrow["mid_name"],
$myrow["user_name"]);

Best regards,

Bob Stone

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text

--
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] Need Help

2001-04-02 Thread Chris Brunelle

Okay, Im having some problem using setcookie().  Basically, I have to form fields, 
Username/Login.  When the username and login are authenticated using mysql, it logs 
into the secure area.  I set the cookie so taht it takes the $username variable that 
the user entered into the form and on the page the user gets after he logs in I want 
it to display:

Welcome $Domainname.  But it's not working.  The cookie is not being set.

I am using this code on the login page.



.mydomain.com isn't the actual domain, I put my own domain there.

$domainname is the form field name.

I then use on the second page.


$dname = $HTTP_COOKIE_VARS["DomainName"];

Then on the page

echo "Welcome $dname";


Still doesn't work.  Any help is greatly appreciated.


Thanks,
Chris




Re: [PHP-DB] Delete all Data and keep the Table

2001-04-02 Thread CC Zona

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Naga Sean) wrote:

> How to delete all the data in database, without delete the table.

Do you want to delete every *table* in the *database*, or delete every 
*row* in the *table*? Assuming the latter, "delete from database_name".

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




RE: [PHP-DB] How to limit a WHILE statement?

2001-04-02 Thread David Balatero

Ok, in your $sql var, put:

$sql = "SELECT * FROM table LIMIT 20";

Leave the other code intact. This fetches 20 rows from MySQL.

-- David Balatero

-Original Message-
From: Bob Stone [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 3:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] How to limit a WHILE statement?


Dear PHP Helpers,

What is your recommendation on limiting a while
statement so that it only iterates a maximum of 20
times?

Here is the code snippet:

$result = mysql_query($sql, $db);

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

printf("Name: %s
%s %s %s\n", $myrow["salutation"],
$myrow["first_name"], $myrow["mid_name"],
$myrow["user_name"]);

Best regards,

Bob Stone

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

-- 
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] Re: [PHP] RE: [PHP-DB] help with compiling ODBC into PHP4

2001-04-02 Thread Andrew Hill

Daevid,

You shouldn't need iodbc.h, just odbc.h - until I can compare what is each
SDK distribution, just create a symbolic link of iodbc.h pointing to odbc.h

udbcext.h is in our iODBC SDK - you should have that. Here is the linux
glibc2.1.1 version: http://www.openlinksw.com/software/open40/l3ko.taz
(also available from iODBC.org).

If you need other platforms, go to:
http://www.iodbc.org/opliodbc.htm (iODBC)
or 
http://www.openlinksw.com/main/softdld.htm (OpenLink)

Best regards,
Andrew
---
Andrew Hill - OpenLink Software
Director Technology Evangelism
eBusiness Infrastructure Technology
http://www.openlinksw.com




On 4/2/01 6:39 PM, "Daevid Vincent" <[EMAIL PROTECTED]> wrote:

> Okay, don't ask me how, but for whatever reason, this "partially worked":
> 
> "./configure --with-openlink=/usr/local/openlink/odbcsdk --with-mysql=/usr/l
> ocal --with-apache=../apache"
> 
> however, now I get a different error:
> 
> In file included from internal_functions.c:38:
> /usr/src/WT_Apache_Setup/php/ext/odbc/php_odbc.h:125: iodbc.h: No such file
> or directory
> In file included from internal_functions.c:38:
> /usr/src/WT_Apache_Setup/php/ext/odbc/php_odbc.h:128: udbcext.h: No such
> file or directory
> make[2]: *** [internal_functions.lo] Error 1
> make[2]: Leaving directory `/data/usr/src/WT_Apache_Setup/php-4.0.4/main'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/data/usr/src/WT_Apache_Setup/php-4.0.4/main'
> make: *** [all-recursive] Error 1
> 
> I've done a 'locate iodbc.h' and don't have one.
> 
> [root=pts/1]3:34pm@content:{/usr/src/WT_Apache_Setup/php}> locate udbcext.h
> /usr/local/openlink/odbcsdk/include/udbcext.h
> /usr/local/openlink/udbcsdk/include/udbc/udbcext.h
> 
> does however exist despite that error message.
> 
> just for fun I tried:
> 
> "./configure --with-openlink=/usr/local/openlink --with-mysql=/usr/local --w
> ith-apache=../apache"  (notice the 'odbcsdk' is not in the path)
> 
> and get a simmilar error:
> 
> In file included from internal_functions.c:38:
> /usr/src/WT_Apache_Setup/php/ext/odbc/php_odbc.h:125: iodbc.h: No such file
> or directory
> In file included from /usr/src/WT_Apache_Setup/php/ext/odbc/php_odbc.h:128,
>from internal_functions.c:38:
> /usr/local/openlink/odbcsdk/include/udbcext.h:47: warning:
> `SQL_LEN_DATA_AT_EXEC' redefined
> /usr/local/openlink/odbcsdk/include/sqlext.h:250: warning: this is the
> location of the previous definition
> make[2]: *** [internal_functions.lo] Error 1
> make[2]: Leaving directory `/data/usr/src/WT_Apache_Setup/php-4.0.4/main'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/data/usr/src/WT_Apache_Setup/php-4.0.4/main'
> make: *** [all-recursive] Error 1
> 
> thank you for your continued help.
> 
>> -Original Message-
>> From: Daevid Vincent [mailto:[EMAIL PROTECTED]]
>> Sent: Saturday, March 31, 2001 12:56 PM
>> To: Andrew Hill; [EMAIL PROTECTED]; PHP General
>> Subject: RE: [PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah
>> lookingfor? .h? .so? .a? what?!
>> 
>> 
>> I get the "No such file or directory" right after the "license
>> box" shows up
>> in the PHP4 compile. Like this (no matter what directory I've
>> tried in that
>> big old list so far):
>> 
>> ./WTConfigure: --with-openlink=/usr/local/openlink/lib: No such file or
>> directory
>> 
>> "./WTConfigure" is just a shell script with make clean, all my --options,
>> make, make install, since I have to compile in mysql, and some
>> other stuff.
>> 
>>> -Original Message-
>>> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
>>> Sent: Friday, March 30, 2001 4:00 PM
>>> To: Daevid Vincent; [EMAIL PROTECTED]; PHP General
>>> Subject: Re: [PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah
>>> lookingfor? .h? .so? .a? what?!
>>> 
>>> 
>>> Daevid,
>>> 
>>> just --with-iodbc or --with-openlink is fine.
>>> 
>>> you should be using either:
>>> 
>>> --with-iodbc=/usr/local/openlink/odbcsdk \
>>> or
>>> --with-openlink=/usr/local/openlink/lib \
>>> 
>>> depending on which you use and where you installed the sdk.
>>> what error are you getting?
>>> 
>>> Best regards,
>>> Andrew
>>> 
>>> 
>>> On 3/30/01 6:54 PM, "Daevid Vincent" <[EMAIL PROTECTED]> wrote:
>>> 
 thanks for replying Andrew, but that's not working for me either.
 
 Also, do I need both "--with-iodbc" and "--with-openlink" or do
>>> I just need
 one of them?
 
 These are the instructions I've been following:
 http://www.iodbc.org/odbc-phpHOWTO.html
 
 so now I've tried:
 
#--with-iodbc=/usr/local/openlink/odbcsdk/lib \
#--with-iodbc=/usr/local/openlink/odbcsdk \
#--with-iodbc=/usr/local/openlink/lib \
#--with-iodbc=/usr/local/bin \
#--with-iodbc=/usr/local \
#--with-iodbc=/usr/local/include \
#--with-iodbc=../libiodbc \
  

[PHP-DB] How to limit a WHILE statement?

2001-04-02 Thread Bob Stone

Dear PHP Helpers,

What is your recommendation on limiting a while
statement so that it only iterates a maximum of 20
times?

Here is the code snippet:

$result = mysql_query($sql, $db);

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

printf("Name: %s
%s %s %s\n", $myrow["salutation"],
$myrow["first_name"], $myrow["mid_name"],
$myrow["user_name"]);

Best regards,

Bob Stone

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

-- 
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] Validating forms

2001-04-02 Thread Manuel Lemos

Hello,

"Julio Cuz, Jr." wrote:
> 
> Hi--
> 
> I have a form that cannot have a specific field blank, so I would like to
> add a message box saying "fill out the x field," is there a way to do this
> WITHOUT having to refresh the page?

Maybe you would like to try this PHP form generation and validation
class that does precisely what you want and more:

http://phpclasses.UpperDesign.com/browse.html/package/1

Manuel Lemos

-- 
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] help with compiling ODBC into PHP4

2001-04-02 Thread Daevid Vincent

Okay, don't ask me how, but for whatever reason, this "partially worked":

"./configure --with-openlink=/usr/local/openlink/odbcsdk --with-mysql=/usr/l
ocal --with-apache=../apache"

however, now I get a different error:

In file included from internal_functions.c:38:
/usr/src/WT_Apache_Setup/php/ext/odbc/php_odbc.h:125: iodbc.h: No such file
or directory
In file included from internal_functions.c:38:
/usr/src/WT_Apache_Setup/php/ext/odbc/php_odbc.h:128: udbcext.h: No such
file or directory
make[2]: *** [internal_functions.lo] Error 1
make[2]: Leaving directory `/data/usr/src/WT_Apache_Setup/php-4.0.4/main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/data/usr/src/WT_Apache_Setup/php-4.0.4/main'
make: *** [all-recursive] Error 1

I've done a 'locate iodbc.h' and don't have one.

[root=pts/1]3:34pm@content:{/usr/src/WT_Apache_Setup/php}> locate udbcext.h
/usr/local/openlink/odbcsdk/include/udbcext.h
/usr/local/openlink/udbcsdk/include/udbc/udbcext.h

does however exist despite that error message.

just for fun I tried:

"./configure --with-openlink=/usr/local/openlink --with-mysql=/usr/local --w
ith-apache=../apache"  (notice the 'odbcsdk' is not in the path)

and get a simmilar error:

In file included from internal_functions.c:38:
/usr/src/WT_Apache_Setup/php/ext/odbc/php_odbc.h:125: iodbc.h: No such file
or directory
In file included from /usr/src/WT_Apache_Setup/php/ext/odbc/php_odbc.h:128,
 from internal_functions.c:38:
/usr/local/openlink/odbcsdk/include/udbcext.h:47: warning:
`SQL_LEN_DATA_AT_EXEC' redefined
/usr/local/openlink/odbcsdk/include/sqlext.h:250: warning: this is the
location of the previous definition
make[2]: *** [internal_functions.lo] Error 1
make[2]: Leaving directory `/data/usr/src/WT_Apache_Setup/php-4.0.4/main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/data/usr/src/WT_Apache_Setup/php-4.0.4/main'
make: *** [all-recursive] Error 1

thank you for your continued help.

> -Original Message-
> From: Daevid Vincent [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 31, 2001 12:56 PM
> To: Andrew Hill; [EMAIL PROTECTED]; PHP General
> Subject: RE: [PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah
> lookingfor? .h? .so? .a? what?!
>
>
> I get the "No such file or directory" right after the "license
> box" shows up
> in the PHP4 compile. Like this (no matter what directory I've
> tried in that
> big old list so far):
>
> ./WTConfigure: --with-openlink=/usr/local/openlink/lib: No such file or
> directory
>
> "./WTConfigure" is just a shell script with make clean, all my --options,
> make, make install, since I have to compile in mysql, and some
> other stuff.
>
> > -Original Message-
> > From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 30, 2001 4:00 PM
> > To: Daevid Vincent; [EMAIL PROTECTED]; PHP General
> > Subject: Re: [PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah
> > lookingfor? .h? .so? .a? what?!
> >
> >
> > Daevid,
> >
> > just --with-iodbc or --with-openlink is fine.
> >
> > you should be using either:
> >
> > --with-iodbc=/usr/local/openlink/odbcsdk \
> > or
> > --with-openlink=/usr/local/openlink/lib \
> >
> > depending on which you use and where you installed the sdk.
> > what error are you getting?
> >
> > Best regards,
> > Andrew
> >
> >
> > On 3/30/01 6:54 PM, "Daevid Vincent" <[EMAIL PROTECTED]> wrote:
> >
> > > thanks for replying Andrew, but that's not working for me either.
> > >
> > > Also, do I need both "--with-iodbc" and "--with-openlink" or do
> > I just need
> > > one of them?
> > >
> > > These are the instructions I've been following:
> > > http://www.iodbc.org/odbc-phpHOWTO.html
> > >
> > > so now I've tried:
> > >
> > >#--with-iodbc=/usr/local/openlink/odbcsdk/lib \
> > >#--with-iodbc=/usr/local/openlink/odbcsdk \
> > >#--with-iodbc=/usr/local/openlink/lib \
> > >#--with-iodbc=/usr/local/bin \
> > >#--with-iodbc=/usr/local \
> > >#--with-iodbc=/usr/local/include \
> > >#--with-iodbc=../libiodbc \
> > >#--with-openlink=/usr/local/openlink/odbcsdk/lib \
> > >#--with-openlink=/usr/local/openlink/odbcsdk \
> > >#--with-openlink=/usr/local/openlink \
> > >#--with-openlink=/usr/local/openlink/lib \
> > >
> > > here is my dir structure:
> > > the files are there, why won't PHP see them? In fact I have the
> > > "libiodbc.so" library in TWO places I see: "openlink/lib/" and
> > > "openlink/odbcsdk/lib/"
> > >
> > > [root=pts/1]3:45pm@content:{/usr/local/openlink}> ll -r
> > > /usr/local/openlink/*
> > > -rw-rw-rw-1 nobody   html0 Mar 29 20:20
> > > /usr/local/openlink/oplrqb.ini
> > > -rwxr-xr-x1 nobody   html  707 Mar 30 15:16
> > > /usr/local/openlink/openlink.sh*
> > > -rwxr-xr-x1 nobody   html  619 Mar 30 15:16
> > > /usr/local/openlink/openlink.cs

RE: [PHP-DB] easy db question

2001-04-02 Thread Oson, Chris M.

joseph,

This was a feature that was recently modified.  Older versions of mySQL
support the 
feature that you seem to want.  3.23.xx and above will support the feature
that you 
have just described.  If you want to roll your own out,

you could do something like...

mysql> SELECT IFNULL(MAX(field) , 0) + 1 AS 'Auto Increment' FROM
newsStories;
++
| Auto Increment |
++
|   1096 |
++
1 row in set (0.01 sec)

Now let's say that you have a hundred records with an "ID" field enumerated
from 1-100.

If you went ahead and deleted 51-78, would you try to "reclaim" 51-78?  or
just continue 
from 100?

If you continue from 100, then the previous query should work.  Should you
try to "reclaim" 
51-78, that seems like a major hassle and I'd probably avoid it at all
costs.

HTH/my $0.02

chris



-Original Message-
From: Paulson, Joseph V. "Jay" [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 2:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] easy db question


hello everyone-
I'm running MySQL 3.23.27-beta with php 4.04pl1.  What I am wondering is I
have an auto incrementing field and if I delete all the entries in the table
with this field the incrementing doesn't start over.  For example, if I
insert 6 records for the first time into this table the auto incremenator
gets set to 6 for the last position.  Now, if I go and delete all 6 of these
entries and then insert 6 more after the deletion the auto incrementing
starts off at 7 and goes through 12.  I'm just curious if there is a way
around this so that if all the records are deleted the auto incrementing
field will start back at 1.

Thanks,
Jay Paulson
Developer, Web Technologies
Viatel, Inc.
http://www.viatel.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-DB] Validating forms

2001-04-02 Thread Julio Cuz, Jr.

Hi--

I have a form that cannot have a specific field blank, so I would like to 
add a message box saying "fill out the x field," is there a way to do this 
WITHOUT having to refresh the page?

Julio Cuz, Jr.
Riverside Community College
[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] easy db question

2001-04-02 Thread Paulson, Joseph V. \"Jay\"

hello everyone-
I'm running MySQL 3.23.27-beta with php 4.04pl1.  What I am wondering is I
have an auto incrementing field and if I delete all the entries in the table
with this field the incrementing doesn't start over.  For example, if I
insert 6 records for the first time into this table the auto incremenator
gets set to 6 for the last position.  Now, if I go and delete all 6 of these
entries and then insert 6 more after the deletion the auto incrementing
starts off at 7 and goes through 12.  I'm just curious if there is a way
around this so that if all the records are deleted the auto incrementing
field will start back at 1.

Thanks,
Jay Paulson
Developer, Web Technologies
Viatel, Inc.
http://www.viatel.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] PHP on WIN32 with DB2 CLI

2001-04-02 Thread Chris Book

Well in linux I use the CLI interface from php to run all my queries.  I
read somewhere that the native CLI interface was faster than using the ODBC
driver.  I have the ODBC driver working properly, I just wanted to know if
it was possible to use CLI with PHP in windows (like on Linux).

I guess I'll just stick with ODBC.

Thanks,
Chris Book
[EMAIL PROTECTED]

-Original Message-
From: Dan Scott [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 01, 2001 11:40 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] PHP on WIN32 with DB2 CLI


Actually, CLI is almost function-for-function the same as ODBC. The PHP
implementation of ODBC is quite a simplified version, but it covers most of
the basic function.

Chris, what is it that you are trying to do, specifically?

Dan

Phil Jackson wrote:

> Chris - I think to use DB2's CLI interface, you need a compiled langauge,
> like
> some flavor of C++ or VB.  I've seen some examples using the CLI
> interface, so
> my question is why on earth would you chose that over generic ODBC?  That
> CLI is nasty-looking,
> pages of code versus what you can do in a few lines with ODBC.. - but I
> have a project
> using both DB2 on a mainframe and DB2 UDB - so I am very interested in
> your thoughts on all this!
> Phil J.
>
>
> Chris Book wrote:
>
>> Hi,
>>
>> I've compiled php before with --with-ibm-db2 to use DB2's CLI driver.
>> Now I'm working on NT with the php binary, and I can't figure out how to
>> connect
>> to DB2 except with ODBC.  I would prefer to use the CLI interface than an
>> ODBC interface.  Is this possible or am I stuck with ODBC on NT?
>>
>> Thanks,
>> Chris Book
>> [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] duplicate a table

2001-04-02 Thread dime

And to go one step further with his question, I would like to know how to do
the following:

2 tables named table1 and table2

table1 contains 3 records, firstname, lastname, password.

table2 is the same except that it has one more field at the beginning and
that field is of type serial.

Now, I'd like to quickly select * from from table1 and insert it into table2
but each time issuing a nextval('sequence') on each one to update the
sequence numbers for table2.

This is because I made a bad design decision and decided I needed to have a
numerical identifier for each table entry, but the only way I know to do it
now would be to manually insert, or to write a php script to do it.  I
actually did end up doing the php script, but would like to know how else to
do it in the future for anything where I'm trying to take the contents of
one table and insert it into another table that has a different structure.

Thanks a lot.  Peace.

-Original Message-
From: McShen [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 2:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] duplicate a table



how do i duplicate a table?
i tried
create table refer2 select * from refer;
create table refer2 as select * from refer;

they didn't work.
my mysql version is  mysql 3.22.28,



--
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] duplicate a table

2001-04-02 Thread McShen


how do i duplicate a table?
i tried
create table refer2 select * from refer;
create table refer2 as select * from refer;

they didn't work.
my mysql version is  mysql 3.22.28,



-- 
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] Please help me with this script...

2001-04-02 Thread Mark Roedel

> -Original Message-
> From: Slider© [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 02, 2001 9:27 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Please help me with this script...
> 
> 
> Hello,
> 
> I've been working on this script all day, but I'm getting the 
> same failure
> report each time:
> 
> Warning: Supplied argument is not a valid MySQL result resource in
> c:\program files\apache 
> group\apache\htdocs\motoerit\toon_alles.php on line 23
> 
> What could be wrong? This is the code I have:

This usually means there was a problem with your query.  For more info,
including some useable sample code that should help you troubleshoot
exactly what went wrong, see

http://www.php.net/FAQ.php#7.12

---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
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] display login info

2001-04-02 Thread Liz Bander

I want to display a user's full name and user id that would be from their 
login action.  (The login stuff is already set up.)  How would I be able to 
grab the user id from the login?  Any ideas on where to look?

Thanks,

Liz


-- 
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] Getting a date from MS SQL in the correct format.

2001-04-02 Thread Andrew Hill

Richard,

ODBC provides escape syntax to specify what how dates are returned from the
database:

e.g. Select * from Table where Date = {d '2000-11-17'}

Best regards,
Andrew
--
Andrew Hill - OpenLink Software
Director Technology Evangelism
eBusiness Infrastructure Technology
http://www.openlinksw.com


> -Original Message-
> From: Richard Quadling [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 02, 2001 12:10 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Getting a date from MS SQL in the correct format.
>
>
> I want to extract a date from a datetime field in Microsoft SQL, via ODBC
> ('cause we support different databases, or so I'm told, and hey, what do I
> know! ).
>
> I want the format to be CCYYMMDD.
>
> Is there a MS SQL function for this?
>
> I've found DATEPART("",field), but I don't know how to get
> all the bits
> (i.e. , MM, DD). I get a numerical addition.
>
> If I CAST as varchar, I don't get a 0 for <10 on MM and DD.
> i.e. 1st January 2001 comes out as 200111 rather than 20010101
>
> I know there must be a format function, but SQL novice here can't find it.
>
> Any suggestions. In the mean time, I've had to use DATEPART to pull the
> three bits in separately and add a bit to the PHP templates to
> add them all
> together. Ideally I want just the value as CCYYMMDD.
>
> Regards,
>
> Richard Quadling.
>
>
>
> --
> 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] Solaris 2.6, PHP 4.0.4pl1, Solid EE 3.51

2001-04-02 Thread meiji

I'm trying compiling PHP4 with Solid once again (Dan Kalowsky advised me to repost 
here) and yet again I've hit a totally brick wall.

1, I'm not sure what is needed in the Solid lib directory and where I can get the 
files if they're not in the archive I've used to install Solid
2, Because there are a number of instructions for various versions of Solid and PHP 
I'm unsure as to whether I'll need to manually edit any of the source files to get 
things working.

Ideally it'd be good if anyone has a definitive source of information, if not just a 
general idea of where to start would be good.

Rgds

M

---
don't reply to this address, reply to [EMAIL PROTECTED]

-

Express yourself @ another.com
http://another.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-DB] Getting a date from MS SQL in the correct format.

2001-04-02 Thread Richard Quadling

I want to extract a date from a datetime field in Microsoft SQL, via ODBC
('cause we support different databases, or so I'm told, and hey, what do I
know! ).

I want the format to be CCYYMMDD.

Is there a MS SQL function for this?

I've found DATEPART("",field), but I don't know how to get all the bits
(i.e. , MM, DD). I get a numerical addition.

If I CAST as varchar, I don't get a 0 for <10 on MM and DD.
i.e. 1st January 2001 comes out as 200111 rather than 20010101

I know there must be a format function, but SQL novice here can't find it.

Any suggestions. In the mean time, I've had to use DATEPART to pull the
three bits in separately and add a bit to the PHP templates to add them all
together. Ideally I want just the value as CCYYMMDD.

Regards,

Richard Quadling.



-- 
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] array_diff usage

2001-04-02 Thread Mark Roedel

> -Original Message-
> From: Martin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 02, 2001 10:48 AM
> To: Mark Roedel; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] array_diff usage
> 
> 
> 
>> This, on the other hand, makes me suspect that the arrays themselves
>> don't actually contain what you think they do.  How are you 
>> assigning the values you described at the top of your message?
> 
> I get them from a database by two select queries.
> Then I do
> 
> $noOpened=mysql_num_rows($jobresult1);
> $noClosed=mysql_num_rows($jobresult2);
> $getlargest = strcmp($noOpened, $noClosed);
> 
> switch ($getlargest) {
>   case $getlargest > 0:
> $counttickets = $noOpened;
> while($sumOpen=mysql_fetch_row($jobresult1)) {   
>  $Open = $sumOpen;
>  // DEBUG
>  print $Open[0] . "";
> 
>}
>while($sumClosed=mysql_fetch_row($jobresult2)) {   
>  $Closed = $sumClosed;
>  // DEBUG
>  print "c" . $Closed[0] . "";
>
>}
> 
> Which produces:
> 1
> 2
> 3
> 4
> 5
> c1
> c2
> 
> So the arrays are correctly set up (I think).

Actually, no.  It looks to me as if each only contains, at any given
time, the most recent value you assigned.  (That is, $Open[0] only
contains the value "5" at the end of the run, and $Closed[0] only
contains the value "2".)

That, in fact, explains the results of your array_diff() quite nicely.

For what you apparently really mean to do, you'll want to replace
$Open = $sumOpen;

with something that looks more like
$Open[] = $sumOpen;

(That'll append the value of $sumOpen to the end of the $Open array,
rather than overwriting the entire $Open variable with the value of
$sumOpen.

Make sense?


---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
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] closing persisent connections

2001-04-02 Thread Nathaniel Dose

Hi -

how are persistent connections closed once they're opened?  is there a timeout or 
something that deactivates them?  i just want to make sure they're not hanging around 
when they're not needed.  


Nathaniel Dose
LeoMedia Berlin



RE: [PHP-DB] array_diff usage

2001-04-02 Thread Martin


 > I'm daft. I don't understand the PHP Manual.
 >
 > I have two arrays:
 > Open[0] contains 1 2 3 4 5
 > Closed[0] contains 1 2
 >
 > Now:
 > $test = array_diff($Open, $Closed);


Given the setup you've described, I think you might actually want

$test = array_diff($Open[0], $Closed[0]);

OK I'll try that.

 > $lines = count($test);
 > print $lines;
 >
 > Gives me: 1
 > I thought it should be 3.


Seems appropriate, given the information you've provided.  $Open and
$Closed each have only one element (0).

 > While:
 > for ($counter =0; $counter <= $lines -1; $counter++)
 > {
 > print $test[0];
 > }
 >
 > gives me "5".


 >This, on the other hand, makes me suspect that the arrays themselves
 >don't actually contain what you think they do.  How are you assigning
 >the values you described at the top of your message?

I get them from a database by two select queries.
Then I do

$noOpened=mysql_num_rows($jobresult1);
$noClosed=mysql_num_rows($jobresult2);
$getlargest = strcmp($noOpened, $noClosed);

switch ($getlargest) {
  case $getlargest > 0:
$counttickets = $noOpened;
while($sumOpen=mysql_fetch_row($jobresult1)) {   
 $Open = $sumOpen;
 // DEBUG
 print $Open[0] . "";

   }
   while($sumClosed=mysql_fetch_row($jobresult2)) {   
 $Closed = $sumClosed;
 // DEBUG
 print "c" . $Closed[0] . "";
   
   }

Which produces:
1
2
3
4
5
c1
c2

So the arrays are correctly set up (I think).

Martin S.


-- 
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] Please help me with this script...

2001-04-02 Thread Slider©

Hello,

I've been working on this script all day, but I'm getting the same failure
report each time:

Warning: Supplied argument is not a valid MySQL result resource in
c:\program files\apache group\apache\htdocs\motoerit\toon_alles.php on line
23

What could be wrong? This is the code I have:

line 23 is: while(list($ID, $Naam, $Adres, [..] $Bet_rest, $Overig_info)
= mysql_fetch_array ($result))


---


Boekingen


 
 


");
 print("ID:Naam:Reisdoel:Datum vertrek:Datum terugkomst:Datum betaling voorschot:Datum betaling
rest:  ");

 print("$ID$Naam$Reisdoel$Dat_heen$Dat_
terugWijzigenVerwijderen\n");

 print("");

include ("footer.txt");
?>
---

Thanks in advance!

Kind regards,

Paul Sidler



-- 
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] Keeping Variables

2001-04-02 Thread Russ Michell

Chris:

in view.php:

Click here to see the value of cr

in anotherpage.php:

echo $cr; //outputs 'yes'


Or:



more form stuff etc etc yadda yadda yadda



?>

//Submitting the form will reload the page and if you detect for it, 
//the variable $arse should be available with the value of 'big' 

HTH ;-)

Russ

#---#

 "Believe nothing - consider everything"

  Russ Michell
  Anglia Polytechnic University Webteam
  http://www.apu.ac.uk/webteam
  [EMAIL PROTECTED]
  +44 (0)1223 363271 ext 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]




RE: [PHP-DB] Keeping Variables

2001-04-02 Thread Steve Brett

session_register("cr");

and then read the manual page on starting sessions etc ...

Steve Brett 
Internal Development 
EMIS Ltd. 

"Privileged and /or Confidential information may be contained in this
message. If you are not the original addressee indicated in this message (or
responsible for delivery of the message to such person), you may not copy or
deliver this message to anyone. In such case, please delete this message,
and notify us immediately. Opinions, conclusions and other information
expressed in this message are not given or endorsed by my firm or employer
unless otherwise indicated by an authorised representative independently of
this message."

Egton Medical Information Systems Limited. Registered in England. No
2117205. 
Registered Office: Park House Mews, 77 Back Lane, Off Broadway, Horsforth,
Leeds, LS18 4RF



> -Original Message-
> From: Chris Hall [mailto:[EMAIL PROTECTED]]
> Sent: 03 April 2001 09:13
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Keeping Variables
> 
> 
> Hey guys, need somore help..
> i need to pass a variable like $cr from view.php to 
> comment.php..i thought
> there used to be a variable called $php_self, but i just searched the
> php.net site and nothin showed up...newaz any help is 
> appreciated. thnx
> 
> --
> Chris Hall
> sytems administrator
> funnelbox mediaworks
> [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] Keeping Variables

2001-04-02 Thread Rubanowicz, Lisa


I use this in forms to submit something to the same page and then do
something like if($submit){  do this  }

Hope it helps
Lisa

-Original Message-
From: Chris Hall [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 03, 2001 9:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Keeping Variables


Hey guys, need somore help..
i need to pass a variable like $cr from view.php to comment.php..i thought
there used to be a variable called $php_self, but i just searched the
php.net site and nothin showed up...newaz any help is appreciated. thnx

--
Chris Hall
sytems administrator
funnelbox mediaworks
[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] Keeping Variables

2001-04-02 Thread Chris Hall

Hey guys, need somore help..
i need to pass a variable like $cr from view.php to comment.php..i thought
there used to be a variable called $php_self, but i just searched the
php.net site and nothin showed up...newaz any help is appreciated. thnx

--
Chris Hall
sytems administrator
funnelbox mediaworks
[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] array_diff usage

2001-04-02 Thread Mark Roedel

> -Original Message-
> From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 31, 2001 10:52 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] array_diff usage
> 
> 
> I'm daft. I don't understand the PHP Manual.
> 
> I have two arrays:
> Open[0] contains 1 2 3 4 5
> Closed[0] contains 1 2
> 
> Now:
> $test = array_diff($Open, $Closed);

Given the setup you've described, I think you might actually want

$test = array_diff($Open[0], $Closed[0]);

> $lines = count($test);
> print $lines;
> 
> Gives me: 1
> I thought it should be 3.

Seems appropriate, given the information you've provided.  $Open and
$Closed each have only one element (0).

> While:
> for ($counter =0; $counter <= $lines -1; $counter++)
> {
> print $test[0];
> }
> 
> gives me "5".

This, on the other hand, makes me suspect that the arrays themselves
don't actually contain what you think they do.  How are you assigning
the values you described at the top of your message?
 

---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
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] MySQL maximums?

2001-04-02 Thread phobo

What is ...

1) The maximum number of tables in a database?
2) The maximum number of rows and
3) (most importantly) the maximum size of a MySQL MyISAM table ? (3.23.35)

1.

I can find no documentation on this; assuming its atleast 2 bytes; or 65536
tables; this value is if no real concern.

2.

>From what I can gather a key can be up to 500 bytes long (without using
special directives, you can increase this to 1024 bytes...).

Which means a ridiculous number of rows (2^500 ... ). Is that the true
maximum of a row count?

3.

Is this simply limited to the Operating System?? Eg;
FAT16 is what? 512 MBs with 8kb sectors?
FAT32 is 2^32 * 8kb (sectorsize) == 32 Terabytes?? (What about on Win98 as
opposed to W2000? Is Win2000 a 64bit OS in this case?)
NTFS?
What about Redhat on a MIPs machine? (Cobalt RAQ2).

Or are table sizes limited by other things??


Thanks,

Siggy


-- 
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] Echo function stopping

2001-04-02 Thread Shannon Doyle

Hi People,

Below I have included some code that just doesn't seem to be functioning all
correctly. I have this running and it appears to stop the query/echo after
the first entry in the database. What is it that I am doing wrong here??

Regards,
Shannon


Round ".$roundnum."";
  echo "".$array[$i]["home"]."".$array[$i]["home_goals"]."\n";
if ($array[$i]["home_goals"] > $array[$i]["away_goals"]) {
  echo "Defeated";
}
elseif ($array[$i]["home_goals"] < $array[$i]["away_goals"]) {
  echo "Defeated by";
}
elseif ($array[$i]["home_goals"] == $array[$i]["away_goals"]) {
  echo "Drew";
}
echo "".$array[$i]["away"]."".$array[$i]["away_goals"]."\n";
}
}
?>



-- 
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] CSS versus Includes

2001-04-02 Thread Steve Farmer

Hi All,

You can also do ..

   if(strpos($HTTP_SERVER_VARS["HTTP_USER_AGENT"], "Macintosh")):
$mysite_style = "mysite_mac.css"; /* MACINTOSH */
   else:
$mysite_style = "mysite_win.css"; /*WINDOZE */
   endif;
   echo "";

So you can combines both browsers and OS's

Regards
Steve Farmer

At 11:31 AM +0100 2/4/01, [EMAIL PROTECTED] wrote:
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Disposition: inline; filename="BDY.RTF"
>   ;Creation-Date="Mon, 2 Apr 2001 11:31:14 +0100"
>
>One of the benefits to including a css (as opposed to LINK REL...) is
>that you can pre-process the CSS file with PHP.
>
>e.g.
>
>my_css.phtml:
>
>
>
>
>
>or even more useful:
>
>if ($Browser='IE')
>{
>   include "ie.css";
>}
>
>else
>{
>   include "other.css";
>}
>
>Hope this helps.
>   _ 
>
>~ Richard Allsebrook ~
>Applications Developer and Webmaster
>Easysoft Limited, Thorp Arch Grange, Thorp Arch, Wetherby, LS23 7BA, UK
>http://www.easysoft.com   -
>http://www.cinema.com 
>"A computer lets you make more mistakes faster than any invention in
>human history - with the possible exceptions of handguns and tequila."
>
>

-- 
---
"Minds are like parachutes, they work best when open"
Support free speech; visit http://www.efa.org.au/

Heads Together Systems Pty Ltd http://www.hts.com.au
Email: [EMAIL PROTECTED] Tel: 612 9982 6767 Fax: 612 9981 3081 

-- 
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] Stopping echo

2001-04-02 Thread Shannon Doyle

Hi People,

Below I have included some code that just doesn't seem to be functioning all
correctly. I have this running and it appears to stop the query/echo after
the first entry in the database. What is it that I am doing wrong here??

Regards,
Shannon


Round ".$roundnum."";
  echo "".$array[$i]["home"]."".$array[$i]["home_goals"]."\n";
if ($array[$i]["home_goals"] > $array[$i]["away_goals"]) {
  echo "Defeated";
}
elseif ($array[$i]["home_goals"] < $array[$i]["away_goals"]) {
  echo "Defeated by";
}
elseif ($array[$i]["home_goals"] == $array[$i]["away_goals"]) {
  echo "Drew";
}
echo "".$array[$i]["away"]."".$array[$i]["away_goals"]."\n";
}
}
?>


-- 
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] CSS versus Includes

2001-04-02 Thread richarda
 BDY.RTF

-- 
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] CSS versus Includes

2001-04-02 Thread Rubanowicz, Lisa

Hi there,
you can also do it this way using Javascript

if (navigator.appName == "Netscape") {
StyleSheet = "netstyle.css"
} else {
StyleSheet = "iestyle.css"
}


document.write('')

All the Best
Lisa

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 11:31 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] CSS versus Includes


One of the benefits to including a css (as opposed to LINK REL...) is
that you can pre-process the CSS file with PHP.

e.g.

my_css.phtml:





or even more useful:

if ($Browser='IE')
{
  include "ie.css";
}

else
{
  include "other.css";
}

Hope this helps.
  _  

~ Richard Allsebrook ~
Applications Developer and Webmaster
Easysoft Limited, Thorp Arch Grange, Thorp Arch, Wetherby, LS23 7BA, UK
http://www.easysoft.com   -
http://www.cinema.com  
"A computer lets you make more mistakes faster than any invention in
human history - with the possible exceptions of handguns and tequila."

  _  

 



-Original Message-
From: mbraynard [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 31, 2001 12:45 AM
To: php-db
Cc: mbraynard
Subject: FW: [PHP-DB] CSS versus Includes


I have found that includes work just about as well. Any suggestions on
going
with one or the other?





RE: [PHP-DB] CSS versus Includes

2001-04-02 Thread richarda
 BDY.RTF

-- 
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] generating valid JS URL from database field with accents???

2001-04-02 Thread fabrizio . ermini

Hi all... I'm having a little problem in converting a site to
spanish, due to - apparently - IE that doesn't like accented words.

I have a db-driven website, of a fairly classical type - texts and
image paths are stored in a DB, and pages are generated thru PHP.

I'm converting this site to spanish language, and I've discovered
that some images link containing accented vowels don't work in IE,
if javascript is involved.

But here is the code (I'm using PHPlib's astraction library, but I
think it's pretty clear):

$db->query("select title, path, path_2 from images_family where
name_family='$name';");
while($db->next_record())
{
$titolo=$db->f("title");
$imagetiny=$db->f("path");
$imagebig=$db->f("path_2");

[...]

echo "$titolo";
$size[0]+=20;
$nomeurl=rawurlencode($name);
$immagineurl=rawurlencode($imagebig);
echo "".$TAGIMMAGINE."\n";

---
("$TAGIMMAGINE" contains the html to display the thumbnail
image, and works good).

Now the problem is that when I click on the thumbnail, I get a
"page not found error". But hovering about it with the mouse, I see
the right URL, and if I do a "copy & paste" of it, it works!

Example:
this is what I found in the HTML source I generate (and it's correct,
IMHO):



this is what I see when I hover on the image:

'javascript:openwindow("/img/Servidor de Periféricos19.gif",681,520);

And this seem correct too, but as I said, if I click on it I get a 404.

What can i do to generate a link that IE likes? I've tried not to use
rawurlencode, but nothing changed. NS works fine.

Thank you in advance for any suggestion...

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Fabrizio Ermini   Alternate E-mail:
C.so Umberto, 7   [EMAIL PROTECTED]
loc. Meleto Valdarno  Mail on GSM: (keep it short!)
52020 Cavriglia (AR)  [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] MSSQL int field problem

2001-04-02 Thread Marck D. Pearlstone

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi php-db members,

I'm not sure if this is the right forum to say this or if this is more
of a PHP technical issue

I have found a strange problem with the MSSQL interface.

I have a small relational database and a PHP script which populates
and queries rows across the tables.

When an integer has been plucked from a table using mssql_query() and
mssql_fetch_array() calls, subsequent use of retrieved integers (say
$id - a relation record id) causes problems in query strings. The
result of converting an int into a string is padded with a string of
null bytes, terminating the query string prematurely from MSSQL's POV
while it looks "fine and dandy" from within PHP.

consider :
 $iQry = 'UPDATE CUSTOMER SET ADDR_ID=$addr_id'.
 'where CUST_ID=$cust_id';

Echo the query string and you see 'UPDATE CUSTOMER SET ADDR_ID=1'

Echo a hex2bin dump of the query string and you see the rest of the
query and the nulls in the middle of it after the '1'.

There is a workaround - use chop($id) and the nulls get trimmed, but
the problem is far from obvious unless the resulting query string is
dumped out with bin2hex.

- --
Cheers -- .\\arck D. Pearlstone -- Consultant Software Engineer
 
[ PGP Key ID: 0x929DCDA0 | www: http://www.silverstones.com  ]

 I'm not crazy, I've just been in a very bad mood for 30 years.

-BEGIN PGP SIGNATURE-
Version: 6.5.8ckt (build 04)
Comment: PGP Sealed for freshness

iQA/AwUBOshMpDnkJKuSnc2gEQIaBwCfUrc9FgoFHJcMwU4gFGiGuJcdoMwAnjNi
uOecfFErEvzJ8dKtK+oLe37M
=r8iu
-END PGP SIGNATURE-




-- 
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] storing arrays in sessions

2001-04-02 Thread olinux

I searched some for this and found nothing that didnt confuse me more

how can i store an array in a session?

Must I register each variable and then put them into the array?
Can you provide an example?

thanks much,
olinux





Re: [PHP-DB] Delete all Data and keep the Table

2001-04-02 Thread olinux

you can,
choose the database on the left hand side and you will se all of your tables
in that db on the right with the option to EMPTY

olinux

- Original Message -
From: "Naga Sean" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 02, 2001 12:25 AM
Subject: [PHP-DB] Delete all Data and keep the Table


> How to delete all the data in database, without delete the table.
> Looks like I can't delete all the data with single click in PHPmyAdmin
mySQL
>
> -naga
>
> _
> www.kaskus.com - FREE EMAIL SERVICE
>
> --
> 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]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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] Delete all Data and keep the Table

2001-04-02 Thread Russ Michell

Using PhpMyAdmin click the 'empty' hyperlink. This will empty all the 
data from the table but not delete the table.

HTH :)

Russ

#---#

 "Believe nothing - consider everything"

  Russ Michell
  Anglia Polytechnic University Webteam
  http://gertrude.sipu.anglia.ac.uk/webteam
  [EMAIL PROTECTED]
  +44 (0)1223 363271 ext 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]




Re: [PHP-DB] PHP an MySQL

2001-04-02 Thread Russ Michell

I have read and have reccommended several times: "PHP Fast and Easy Web 
Development" By Juli C Meloni.



ISBN: 0-7615-3055-X
Prima Tech publishing

#---#

 "Believe nothing - consider everything"

  Russ Michell
  Anglia Polytechnic University Webteam
  http://gertrude.sipu.anglia.ac.uk/webteam
  [EMAIL PROTECTED]
  +44 (0)1223 363271 ext 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]




RE: [PHP-DB] ecommerce - storing as an array or temporary record

2001-04-02 Thread Steve Brett

there is an excellent tutorial with a coded example of a shopping cart using
sessions.

http://www.phpbuilder.com/columns/evert2816.php3

only takes small mods to extend it so you can delete from cart as well.


Steve Brett 
Internal Development 
EMIS Ltd. 

"Privileged and /or Confidential information may be contained in this
message. If you are not the original addressee indicated in this message (or
responsible for delivery of the message to such person), you may not copy or
deliver this message to anyone. In such case, please delete this message,
and notify us immediately. Opinions, conclusions and other information
expressed in this message are not given or endorsed by my firm or employer
unless otherwise indicated by an authorised representative independently of
this message."

Egton Medical Information Systems Limited. Registered in England. No
2117205. 
Registered Office: Park House Mews, 77 Back Lane, Off Broadway, Horsforth,
Leeds, LS18 4RF



> -Original Message-
> From: Stuart J. Browne [mailto:[EMAIL PROTECTED]]
> Sent: 02 April 2001 06:57
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] ecommerce - storing as an array or temporary
> record
> 
> 
> 
> > I am developing a script that will eventually be a "pay-to-list your
> whatever" script.
> > I am wondering if the best way to hold data throughout the 
> four forms
> would be to hold
> > these in an array - each form would array_push() the vars into the
> $listing array.
> 
> > Or would it be better to insert the records as they come in 
> - each form -
> ?
> > I am thinking that one connection to the DB might be 
> easiest to carry out.
> 
> Why store them in a database?
> 
> In any case, Serialize()/UnSerialize() and Sessions..
> 
> bkx
> 
> 
> 
> -- 
> 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 Reference

2001-04-02 Thread Fernando Buitrago

I need good reference of PHP functions, (include odbc, Interbase, MySql),
but I need download this reference to see offline o print.

Regards



-- 
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] passing parameters between forms

2001-04-02 Thread Sharmad Naik

Hi,
I have created a database with following structure

CREATE TABLE member(
mem_id INT,
name TEXT,
age INT);

the first page is as follows :




This is the  first page 
  
   Member ID : 
   
   Member NAME :
   
   Member AGE :   
   

   
   



The second page that is search 2.php is as follows :




This is the Displaying page
");
echo("$mem_id");
echo("$name");
echo("$age");
echo("");
//  require("search3.php");
//  series($mem_id,$name,$age);
echo("");
}
else{ echo("Inconvient data");}
?>



This is search3.php




In my search3.php I want to insert (which i have not given) or atleast echo the 
parameter like mem_id, age and name.My Q
+is how do i pass the parameters between search2.php and search3.php.If there is 
+another way out pls tell.
I tried using functions to get the work done.but couldn't get my way out.

Can anybody help me?


Sharmad

-- 
The secret of the universe is @*&í!'ñ^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

-- 
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] SOLVED SORRY - Delete all Data and keep the Table

2001-04-02 Thread Naga Sean

How to delete all the data in database, without delete the table.
Looks like I can't delete all the data with single click in PHPmyAdmin mySQL

-naga

_
www.kaskus.com - FREE EMAIL SERVICE

-- 
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] Delete all Data and keep the Table

2001-04-02 Thread Naga Sean

How to delete all the data in database, without delete the table.
Looks like I can't delete all the data with single click in PHPmyAdmin mySQL

-naga

_
www.kaskus.com - FREE EMAIL SERVICE

-- 
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] passing parameters between forms

2001-04-02 Thread Sharmad Naik

Hi,
I have created a database with following structure

CREATE TABLE member(
mem_id INT,
name TEXT,
age INT);

the first page is as follows :



This is the  first page 
   
   Member ID : 
   
   Member NAME : 
   
   Member AGE : 
   
   
   
   



The second page that is search 2.php is as follows :




This is the Displaying page
");
echo("$mem_id");
echo("$name");
echo("$age");
echo("");
//  require("search3.php");
//  series($mem_id,$name,$age);
echo("");
}
else{ echo("Inconvient data");}
?>



This is search3.php



In my search3.php I want to insert (which i have not given) or atleast echo the 
parameter like mem_id, age and name.My Q is how do i pass the parameters between 
search2.php and search3.php.If there is another way out pls tell.
I tried using functions to get the work done.but couldn't get my way out.

Can anybody help me?


Sharmad

-- 
The secret of the universe is @*&í!'ñ^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

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