[PHP] MySQL Newbie

2002-01-28 Thread Ben Clumeck

How do I use MySQL through the web.  I currently have MySQL running on my
personal PC on WinXP.  I use a command prompt to add tables, add records,
and so forth.  How do I create tables and records when my database is on the
web?

Thanks,

Ben


-- 
PHP General 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] MySQL Newbie

2002-01-28 Thread hugh danaher

Ben,
Making the assumption that you plan on using php as the language to place or
extract data from the mysql database, you'll need to:
open a mysql database on-line (or have the site manager do this for you)
Write a php interface program which would write to, change or extract data
from the mysql database.

if you are familiar enough with the command line prompts you could use a
variation of the following to write to or alter your database:

html
head
titleDatabase Modification Page/title

/head
body bgcolor=Navy 

table width=95% valign=top cellpadding=7 bgcolor=silvertrtd

form action=?php print $php_self? method=post
?php

// open database section
print table width=100%trtd valign=topDatabase Name:brinput
type=text  name=db br;
print Database Password:brinput type=text name=passbrnbsp;/td;
print td valign=top align=centerh1DATABASE MODIFICATION/h1;
print /td/tr/tablebr;
print Database Action:brtextarea name=request rows=9
cols=90/textareabrnbsp;br;
print input type=submit value=\  go  \;
print /form;
if (isset($db))
 {
 $link=mysql_connect(localhost,,$pass);
 if (! $link) die(couldn't connect to mysql);
 mysql_select_db($db,$link) or die (couldn't open $db .mysql_error());

 $results=mysql_query($request);   //  purpose statement
 if (! $results)
  {
  die (cannot Modify $db .mysql_error());
  }
 else
  {
 print Database Action: .$request;
  }
 mysql_close($link);
 unset($db);
 }


?
/td/tr/table
/body
/html


- Original Message -
From: Ben Clumeck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 2:49 PM
Subject: [PHP] MySQL Newbie


 How do I use MySQL through the web.  I currently have MySQL running on my
 personal PC on WinXP.  I use a command prompt to add tables, add records,
 and so forth.  How do I create tables and records when my database is on
the
 web?

 Thanks,

 Ben


 --
 PHP General 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 General 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] MySQL Newbie

2002-01-28 Thread Girish Nath

Hi

If you haven't got shell access but have a PHP enabled webserver then you
could try and install phpMyAdmin:

http://www.phpwizard.net/projects/phpMyAdmin/

Regards


Girish
--
www.girishnath.co.uk



- Original Message -
From: Ben Clumeck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 10:49 PM
Subject: [PHP] MySQL Newbie


How do I use MySQL through the web.  I currently have MySQL running on my
personal PC on WinXP.  I use a command prompt to add tables, add records,
and so forth.  How do I create tables and records when my database is on the
web?

Thanks,

Ben


--
PHP General 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 General 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] MySQL Newbie

2002-01-28 Thread bvr


Hi,


You can do the exact same thing but instead of connecting to localhost,
you connect to the remote server.

To do this with the mysql monitor tool, use the -h command line option, followed 
by the hostname or IP of the server.

If you cannot access the online database directly (possibly for security matters)
you can write a simple PHP script that runs your query/queries, upload it to the
server and point your browser to it.

Creating tables and records like you mention is exactly the same this way, since
they're just plain queries.

Ofcourse in both cases you would need a MySQL login that has permission to CREATE,
which is granted separately from INSERT or UPDATE.

bvr.


On Mon, 28 Jan 2002 14:49:11 -0800, Ben Clumeck wrote:

How do I use MySQL through the web.  I currently have MySQL running on my
personal PC on WinXP.  I use a command prompt to add tables, add records,
and so forth.  How do I create tables and records when my database is on the
web?




-- 
PHP General 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] MySQL Newbie ? -Help!

2001-01-09 Thread Jason Brooke

one simple way would be to make a duplicate, empty table and then do:

insert into newtable select distinct * from oldtable


then try adding a uniqueness constraint if you don't want duplicates in the
future

jason



 Hi,
 Is there a way to go through a table and remove all duplicate entries so
 that there is only one? The way I am doing it now is taking FOREVER.
Thanks,

 Matt Stone





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