Re: [PHP-DB] db's war

2001-09-18 Thread Tom Carter

Having worked in IBM and in Open Source community I feel I've know both
systems very well.

MySQL is different to the "big boys" of DB2 and Oracle. They are designed
for enterprise level, and to handle a complexity and quantity of data which
mysql just isn't there. The SQL used in mysql is vastly simpler than that
used in the others, and could be said to less powerful in that in can do
much less. This leads on to what I feel is the key point here, mysql place
has not been in doing in enterprise level stuff, it has been in providing a
good simple way of doing simpler things. Because of its simplicity it
manages to be very effecient,  but when you start trying to build it more
complex the obvious flaws in the language.
I'm eagerly awaiting the next release of mysql to see what they do with it.
I think they will either stick to how it as at the moment and further
improve performance and the basic features or are they going to take a step
up (and away) from where they are at the moment and start to see more
complex features (maybe even sub-selects. now that I *would* like to see
in there). Either way I don't think mysql competing with db2 or oracle, at
least in the reasonably long future, is all that likely. The customer base
and trust is there too strong + the products are actually decent (which is
where any analogy between ASP and PHP breaks down ;) )

As in almost everything in IT, and I life I guess, it's a case of best tool
for the job.

Well, there's my ha'penny's worth.

Anyone want to start a DB2 / Oracle debate? (JOKE been there done that,
neither won)

Tom
- Original Message -
From: "Sommai Fongnamthip" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 18, 2001 2:36 AM
Subject: [PHP-DB] db's war


> hi
> I'd like to survey php commnunity about how do you think about merge
> between informix and ibm?  Did there remain only 2 major dbms (oracle and
> db2)?  do you think MySQL will be the leader with next version 4?
>
> SF
>
>
> --
> 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] USA Attacks

2001-09-12 Thread Tom Carter

now isn't the time for these kind of discussions, and nothing can excuse the
death of all those innocent people. America as a nation is far from innocent
however, I agree with you on that Lars.

My sincerest condolances to all those involved.

Let's just hope that the crazy man bush doesn't do anything stupid

> It is replies like this that makes me understand the terrorism in the
> world...
>
> No doubt, it was a horrible act by cowards, but what comes up must come
> down. US has been playing with fire once too often and suddenly tasted
their
> medicine - maybe time to rethink the "world police" strategy again.
>
> I feel sympathy for all who died in the incident for no cause. Dont get me
> wrong on that point !
>
> / LJ
>
> -Original Message-
> From: Bartek Pawlik [mailto:[EMAIL PROTECTED]]
> Sent: 12. september 2001 14:35
> To: [EMAIL PROTECTED]
> Subject: Odp: [PHP-DB] USA Attacks
>
>
> My deepest sympathy to all Americans,
>
> It's horrible, I can still believe it.
> Kill everyone who is involved into these attacks
>
> Bartek Pawlik
> Poland
> - Original Message -
> From: Steve Farmer <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 12, 2001 4:28 AM
> Subject: [PHP-DB] USA Attacks
>
>
> > Hi,
> >
> > My heart goes out to all our American cousins in their time of tragedy.
> >
> > Steve Farmer
> > --
> > ---
> > "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]
> >
>
>
>
> --
>
> Zagraj z finalistkami
> Miss Polonia [ http://miss.onet.pl/start.html ]
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP-DB] Backups, best practices

2001-09-07 Thread Tom Carter


> you can get command line zip/compression packages for windows, although
for
> *some* reason, as far as i know, not a command line version of winzip -
the
> big one!

err.. please correct me if I'm wrong, but isn't pkzip exactly that? or more
exactly, winzip is a windows interface to it? it certainly uses the same
compression
>
> anywho, all of those should be able to be scheduled using the "at" command
> from DOS (good old DOS... the closest a microsoft weenie will come to
heaven
> (*nix) :P)
>
> HTH
>
> Beau
>
> // -Original Message-
> // From: Dan Brunner [mailto:[EMAIL PROTECTED]]
> // Sent: Friday, 7 September 2001 2:33 AM
> // To: Jacob Singh
> // Cc: [EMAIL PROTECTED]
> // Subject: Re: [PHP-DB] Backups, best practices
> //
> //
> // Hey Hey Hey!!!
> //
> // That depends on what system your running!?!?!?
> //
> // I run LinuxPPC and use 3 ways
> //
> // 1. Bru Tape back system
> //
> // 2. At 12:00 AM the shell script runs and copies the files..
> //
> // 3. Once a month I manually copy the files to a zip.
> //
> //
> // Dan
> //
> //
> //
> // PS WindowsGood luck.
> //
> //
> // On Thursday, September 6, 2001, at 09:22 AM, Jacob Singh wrote:
> //
> // > Hello,
> // >
> // >   I'm just wondering how everyone manages their MySQL backups, I'm
> // >   looking for a better solution than manual.  any scripts
> // or example
> // >   would be especially appreciated. tnks
> // >
> // > --
> // > Best regards,
> // >  Jacob Singh
> // >  Pajama Design
> // >  (413)582-9342
> // >  2 Belanger Pl.
> // >  Northampton, MA 01060
> // >
> // > mailto:[EMAIL PROTECTED]
> // >
> // >
> // > --
> // > PHP Database Mailing List (http://www.php.net/)
> // > To unsubscribe, e-mail: [EMAIL PROTECTED]
> // > For additional commands, e-mail: [EMAIL PROTECTED]
> // > To contact the list administrators, e-mail:
> // [EMAIL PROTECTED]
> // >
> //
> // --
> // PHP Database Mailing List (http://www.php.net/)
> // To unsubscribe, e-mail: [EMAIL PROTECTED]
> // For additional commands, e-mail: [EMAIL PROTECTED]
> // To contact the list administrators, e-mail:
> // [EMAIL PROTECTED]
> //
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP 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] SQL combine to summations queries?

2001-09-06 Thread Tom Carter



> Hello,
> 
> I don't understand the following, who can help?
> 
> I have got two queries:
> SELECT SUM(fielda) FROM table1
> and
> SELECT SUM(fieldb) FROM table2
> 
> I thought this would be the same as:
> SELECT SUM(fielda.table1),SUM(fieldb.table2)   FROM table1, table2.
> But, itn't, why?

I think you mean table1.fielda rather than fielda.table1.

> Tnx,
> 
> Bas Jobsen
> 
> 
> -- 
> 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] implementing php with IBM branded apache

2001-09-05 Thread Tom Carter

What OS are you running on it? I've used php on an rs6000 while at IBM.
worked fine, I didn't install it tho, but I don't think they had any
problems.

HTH, Tom
- Original Message -
From: "Marc Grober" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 6:09 PM
Subject: [PHP-DB] implementing php with IBM branded apache


> We are using the IBM branded apache on an rs6k. I would like to add php
> functionality.  Is there some way to add the php module? As I understand
> it, I can still use php it just won;t be compiled into apache ???
> marc grober
>
>
> --
> 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] phpMyAdmin (well mySQL) and listing DB's

2001-08-19 Thread Tom Carter

Hi All,

I was trying to set up phpMyAdmin for a client on my machine, and I've
created a mysql account for him such that he can only use his database, yet
when I use phpMyAdmin (with the correct setting) he can see all the
databases. The security is still there, it just looks messy + reveals all
the dbs.

Anyone have any advice?

TIA, Tom
Tom Carter
Web Architect
roundcorners ltd.


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

2001-08-19 Thread Tom Carter

   Yes that is correct. On a security point of view therer is something
extra you can do.. when using require you can require files that are outside
the web tree...by this I mean are not accessible thru the internet. So if
you site was in /home/web then you could setup a directory, say
/home/web_vars and in this put these kind of files.

In the require statement you just then simple put in the full path, eg
require("/home/web_vars/vars.php");

The advantage of doing this is security When the file with such sensitive
information is included in the web tree then there are (admittedly limited)
possible scenarios in which this could be compramised. It is generally
accepted that it is sensible to avoid putting such information in the web
tree.

Hope I've been clear, let me know if you need any more advice.

> so in var.php i will put something like this
>
> $db="mydatabse";
> $username="myusername";
> $password="mypassword";
>
>
> and so on?
>
>
> --
> Cross Walk Central
> www.crosswalkcentral.net
> Support Center
> Your Web Hosting Community!
>
> "Seb Frost" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > chuck all the common variables in var.php
> >
> > then just put
> >
> >  > require("var.php");
> > ?>
> >
> > - seb
> >
> > -Original Message-
> > From: CrossWalkCentral [mailto:[EMAIL PROTECTED]]
> > Sent: 19 August 2001 03:18
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] Include
> >
> >
> > OK here is one for you folks that know what you are doing.
> >
> > I am making a script and I have about 5 php files in it. That have alot
of
> > the same system variables can I create one file with these settings in
it
> > and if so any one want to give me some hints on this
> >
> > thanks again.
> >
> > --
> > Cross Walk Central
> > www.crosswalkcentral.net
> > Support Center
> > Your Web Hosting Community!
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP-DB] Valid resource

2001-08-06 Thread Tom Carter

is $file the result of a fopen?
- Original Message -
From: "Wilmar Pérez" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Monday, August 06, 2001 5:31 PM
Subject: [PHP-DB] Valid resource


> Hi guys.
>
> I'm getting the following error and have no idea what the hell it means:
> **
> Warning: Supplied argument is not a valid File-Handle resource in
common.php
> on line 425
>
> Warning: Supplied argument is not a valid File-Handle resource in
common.php
> on line 426
>
> Warning: Supplied argument is not a valid File-Handle resource in
common.php
> on line 427
> **
>
> the mentioned lines are:
>
> **
>   fputs ( $file, "\n");
>   fputs ( $file, "\n");
>   fclose( $file );
> **
>
> I guess many of you will ask for the full common.php file, as it is quite
a
> long one I will send it at request.
>
> Any help will be highly appreciated!
>
> Thanks
> ---
> Wilmar Pérez
>  IT Manager - Central Library
>  University of Antioquia
>Medellín - Colombia
>   tel: ++57(4)2105145
> ---
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP-DB] #usr showing up

2001-08-04 Thread Tom Carter

why is that line in there at all? The fact that the file has a .php
extension and is going thru apache is enough... delete it and php should
work fine.
- Original Message -
From: "Vipin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 02, 2001 12:48 PM
Subject: [PHP-DB] #usr showing up


> Hi,
> I am running php as cgi. The top line , #/usr/bin/lib, is showing up
> on the php page when the script executes. How can I avoid this. Please
> help.
>
> Thank you,
> Vipin.
>
>
> --
> 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] phpMyAdmin: delete table

2001-08-03 Thread Tom Carter

> Don't know about phpAdmin, but in straight PHP, after you've connected to
> database, etc.
>
> $sql = "drop table tablename";
> $result = mysql_query( $sql );

Do yuo use PHP anyway? the comment on that was probably it.

Otherwise, if you ahve command line access to mysql then the above SQL (DROP
TABLE tablename;) should work fine.

> if you want to test for the table before deleting use
> $sql = "drop table if exist tablename";
>
> HTH - Miles
>
> At 03:30 PM 8/3/01 +0200, thomas wrote:
> >Hi, I'm new to phpMyAdmin but they told me to use this programm to delete
a
> >table from my mysql database.
> >I've configured the file and when i try to run phpMyAdmin i can see my
> >database on the left frame, however the right frame doesn't show up at
all.
> >(instead there's a download dialog box opening all the time). When i
> >download the file and open it in notepad i get an unreadable set of
> >characters
> >
> >what should i do to delete that table??
> >
> >
> >
> >
> >
> >--
> >PHP Database Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP-DB] Limit Select Field Characters?

2001-08-01 Thread Tom Carter

left(timestamp,6)
- Original Message - 
From: "Jeff Oien" <[EMAIL PROTECTED]>
To: "PHP-DB" <[EMAIL PROTECTED]>
Sent: Wednesday, August 01, 2001 11:33 PM
Subject: [PHP-DB] Limit Select Field Characters?


> I have a timestamp field that looks like this
> 0109011754
> but I only want to compare
> 010801
> when doing a SELECT. Is there a way I can do this? Thanks.
> Jeff Oien
> 
> 
> -- 
> 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] who's logged on / how to I find out about other sessions

2001-07-23 Thread Tom Carter


Hi Christian,

What most sites do is to keep track of the latest time that a user requested
a page (ie when a page is requested store the current time).

Then a definitiion of "logged-in" is made usually this is "has requested
a page in the last 30 minutes" so the query to count the users whose time of
last access was within 30 mins of now.

Hope this makes sense,

Tom

> Hi,
>
> I'm writing a bbs/messageboard system and am trying to figure out how to
tell
> what other users are logged on.
>
> I know I could store the info in a table in my login code but then how do
I
> find out if people are logged out
> with out making them actually use a logout button or the like.
>
> I was going to do it that way but I have noticed that phpnuke sites can
list
> the number of logged in sites etc;
> but their code is a little beyond me atm
>
> Is there a way to list other session vars ?
>
> any ideas welcome
>
> with thanks
>
> Christian
>
>
> Christian Cable
> ICT Assistant
> Careers Service; Lancaster University
> Tel: (01524) 594072  Fax: (01524) 592072
> http://www.lancs.ac.uk/staff/cable/
>
>
>
> --
> 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] Which state and country?

2001-07-02 Thread Tom Carter

This can give a fair idea of where that person has come from, and if they
are international then the country may be obvious. I would be very surprised
if you could collect meaningul information about which state they are tho.
In my experience, however, lots of hosts turn off reverse DNS lookups
last count in my stats was 40%. That said, there are pretty much no other
(simple) ways of doing this


> Turn on referrers in the Apache config file and do reverse DNS lookuips in
> your web analyser.
>
> -Original Message-
> From: Lisa Elita [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 28, 2001 9:21 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Which state and country?
>
>
> Hi all,
>
> How can we know from which state and country a hit came?
>
> Regards,
> Lisa Elita
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP-DB] php/mySQL and html

2001-05-06 Thread Tom Carter

Hi Nick,

Assuming you have the rest of the databse interaction, all you need to is
store the value of the selection (the store script will recieve a varialbe
$state="AK" or whatever.

To then display the users state do the following
//Get the users state from the database
//do this however appropiate in your code
$users_state = "AK"; //(for the sake of argument)

//create array of states (better way of making the form
$states = array("AK","AR",);

$numstates=count($states);
echo(" $currstate");//finish the tag
}
echo("");

Hope this helps!
Tom




 On Sun, 6 May 2001, Nick
Terzich wrote:

> hi...
>
> I have a user registration system that I need to add a
> "state" field to. Part of the form will look something
> like this but with all 50 states instead of just two:
>
> 
> 
> AK
> AL
> 
> 
>
> ...how do I insert the user's state into the database
> and then how do I show the user's state as the
> "selected" state in the drop down list later when the
> user comes back to update his/her profile?
>
> hope this makes sense.. thanks,
>
> nick
>
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.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]
>


-- 
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] Migrating MySQL Table Data

2001-02-04 Thread Tom Carter

The CREATE TABLE .. FROM ... SQL will do what you require, but I don't
think this is included in MySQL (one to check)...however if performance is
becoming an issue, ,then you may want to consider migrating to a different
DBMS (mySQL is not so good at handling large record sets, and has a much
cut-down set of SQL sytanx).

Sticking with mysql however, if it was a once off move that needed to take
place (which is what it sounds like) then it wouldn't be hard to write a
simple agent .. somethi like

1. select all records in the original table 
2. Loop through all the records (rows)
  2.1. extract the fields from the currently selected row
  2.2. INSERT this into your new table
  2.3 go onto the next row
3. Once all are done, drop the unwanted columns from your old table

Inelegant ,yes, but it will work! If you want more help, contact me OL

Tom

On Sun, 4 Feb 2001, phobo wrote:

> I am in the process of improving a database scheme considerably in MySQL, by
> breaking tables into smaller tables and so one. I am wondering if there is a
> simple SQL statement to take ALL ROWS of fields 'f1', 'f2', 'f3', and copy
> them to the another table Then I can remove the fields in the original
> table.
> 
> eg something like
> INSERT INTO BetterSmallerTable SET (PrimKey,Red,Green,Blue) VALUES (SELECT
> PrimKey,Red,Green,Blue FROM BigClumsyTable) ??
> 
> 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 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] insert into mysql

2001-01-29 Thread Tom Carter



On Thu, 25 Jan 2001, Darryl Friesen wrote:

> 
> 
> > It still didn't work.
> > just says unable to add part
> 
> > > $sql = "INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp')";
> 
> Another thought:  Are ID and part character data of some sort?  If not (i.e.
> if ID is an int) then remove the single quotes.
> 
A trivial point this, but if you insert values in ' into a mysql int
column then MySQl still treats it as intended. THey aren' necessary for
int columns, but it is acceptable to have them there

-Tom > 
> - Darryl
> 
>  --
>   Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED]
>   Education & Research Technology Services, http://gollum.usask.ca/
>   Department of Computing Services,
>   University of Saskatchewan
>  --
>   "Go not to the Elves for counsel, for they will say both no and yes"
> 
> 
> 
> -- 
> 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] pop up windows

2001-01-26 Thread Tom Carter

Hi John,

The essential difference between PHP and JavaScript is that PHP is
server-side and JavaScript client side. What this means is that when a
user requests a PHP page, all the functions, commands etc are run on the
server and then sent to the users machine, where as with JS the code is
effectively downloaded to the users machine and then run there.

In practice this means that anything which involves manipulating the users
computer (as opposed to just displaying output, which is what PHP does)
can only be done in JavaScript. Hence pop-up windows, which are
mainuplations of the users machine, are impossible in PHP alone.

However, what is possible, and I've found very powerful, is to use PHP to
create dynamic JS.

Essentially you use PHP to make JS in the same way it makes html

eg.


alert('');


What would happen here is that the php parser on the server would run
first, and replace the echo statement with the value of $users, and then
return the javascript for the users machine to process, ie the user in
this case would recieve the following (assuming $user="bjorn"):


alert('bjorn');


Hope this helps,

Tom

On Fri, 26 Jan 2001, John Miller wrote:

> I know that this is off the subject, but I am hoping that some would be 
> kind enough to tell me what I would like to know.  In java script there is 
> an alert "command" that will cause a message box to popup.  Is there a way 
> to do it in php.  Better information would be to tell me where I could find 
> it in the documentation.
> 
> Thanks,
> John Miller
> 
> 
> -- 
> 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] Damn Cookie

2001-01-26 Thread Tom Carter

what is probably happening is that your file, page.html is setting the
variable user_name to a value at some point in the script. The URL you
gave effectively is the same as making the first two lines of the file
read
$user_name='name';
$password='password';

Hence if a subsquent line in the script then sents $user_name to a
different value then this will replace 'name'. TGhis would happen, for
example if you read from a cookie to find out the name.

One simple way around this is...

if(!$user_name)
{
//code to execute if $user_name hasn't alread got a value
}


On Thu, 25 Jan 2001, John Starkey wrote:

> I'm not sure if this is my problem but it's wigging me out.
> 
> I've got a login page posting only the user_name and password vars. No
> matter what it's using the same name over again.
> 
> http://.../page.html?user_name=name&password=password
> 
> When i open page.html and do echo $user_name it still doesn't echo the
> name above. Nothing is happening before the echo. 
> 
> I just checked with mac and it logged in the first time showing the user
> that I entered and is in the url. But when I went back and logged in under
> a diff name it retained the original name. 
> 
> Anyone know what's going on?
> 
> Thanks,
> 
> John
> 
> 
> -- 
> 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]