Re: Set no root password

2003-06-14 Thread John Chang
Simply I didn't know where the password was located in myphpadmin.  I 
wanted it secure but I wanted to be able to get to the data with myphpadmin 
too.  But now I know where it is I put the password in.  And now I want to 
protect phpmyadmin so that only folks with a username/password can access it.

At 10:43 AM 6/14/2003 -0500, you wrote:
At 1:53 -0400 6/14/03, John Chang wrote:
It worked!!.  Thanks.  Now how do I protect it so that not anyone who 
points to it cannot get to it without putting in a username/password?
You seem to have an odd set of goals.

First, you want to remove the password from your MySQL root account.
That is, you want to remove the protection against unauthorized access.
Next, you want to keep people from getting to it without a password.
That is, you want protection against unauthorized access.
I fail to understand what you're trying to achieve...

At 12:24 AM 6/14/2003 -0500, John Nichel wrote:
John Chang wrote:
I changes the password but it still doesn't work.  This is the error I 
get when I try to connect to MySQL using phpmyadmin using a browser.
What do I need to change? Thanks.

Error
MySQL said:
Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)
At 11:37 PM 6/13/2003 -0500, Paul DuBois wrote:

At 0:10 -0400 6/14/03, John Chang wrote:

How do I set no password for root?


mysql -u root -p
Enter password: (your current root password here)
mysql SET PASSWORD = '';
mysql quit
--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/
If you changed it to have no root password, you need to edit the 
config.inc.php file in your phpmyadmin directory.  Get rid of the 
password there.

With that being said, why would you want an empty root password


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/


Set no root password

2003-06-13 Thread John Chang
How do I set no password for root?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Set no root password

2003-06-13 Thread John Chang
I changes the password but it still doesn't work.  This is the error I get 
when I try to connect to MySQL using phpmyadmin using a browser.   What do 
I need to change? Thanks.

Error

MySQL said:

Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)

At 11:37 PM 6/13/2003 -0500, Paul DuBois wrote:
At 0:10 -0400 6/14/03, John Chang wrote:
How do I set no password for root?
mysql -u root -p
Enter password: (your current root password here)
mysql SET PASSWORD = '';
mysql quit
--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/


Re: Set no root password

2003-06-13 Thread John Chang
It worked!!.  Thanks.  Now how do I protect it so that not anyone who 
points to it cannot get to it without putting in a username/password?

At 12:24 AM 6/14/2003 -0500, John Nichel wrote:
John Chang wrote:
I changes the password but it still doesn't work.  This is the error I 
get when I try to connect to MySQL using phpmyadmin using a browser.
What do I need to change? Thanks.

Error
MySQL said:
Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)
At 11:37 PM 6/13/2003 -0500, Paul DuBois wrote:

At 0:10 -0400 6/14/03, John Chang wrote:

How do I set no password for root?


mysql -u root -p
Enter password: (your current root password here)
mysql SET PASSWORD = '';
mysql quit
--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/
If you changed it to have no root password, you need to edit the 
config.inc.php file in your phpmyadmin directory.  Get rid of the password 
there.

With that being said, why would you want an empty root password


Securing MYSQL

2002-12-26 Thread John Chang
I have a website that uses MYSQL, PHP, IIS, WMS4.1 on a win2k box.  The 
WMS4.1 is on a separate box and uses MyODBC to connect to MySQL.  It only 
does look up.  On the other box that has MYSQL, PHP,  IIS there is insert, 
delete, select, etc.  How do I secure MYSQL with NTFS permissions so that 
it doesn't break anything?  I tried using authenticated users, and other 
users but can't seem to get the right configuration.  Since the D: drive 
had the MySQL  PHP folder I wanted to tighten it down.  Right now it is 
set to everyone full control.  Thank you.


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



update mysql

2002-12-20 Thread John Chang
I e-mailed the list but haven't received a response.  I have win2k w/
3.23.53 and need to update it to 54.  Is there a patch or do I have to do a
reinstall or install on top of it?

mysql


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




win2k update

2002-12-18 Thread John Chang
Is there a patch update from .3 to .4? So that I don't have to reinstall it
on my win2k box?   If I have to reinstall it do I need to first uninstall 
.3 first?
mysql.


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



MYSQL Overhead

2002-12-17 Thread John Chang
In some of my tables I see overheard.  What does it mean and does it mean I 
have to optimize it every time?  I seem to see it everyday. SQL


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Secure

2002-11-27 Thread John Chang
Is there a website, book, or tips to secure and optimize MYSQL?

This is what my users look like:
Host  Users  PasswordPrivileges
localhost administratoryes   has all priv.
localhost root yes   has all priv.

Is this a good?   If the host is localhost does that mean no one can access 
it unless they have like physical access?  In other words they can't 
connect to it via IP address.


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Select statement problem

2002-11-25 Thread John Chang
I am creating a search form for the TitleName.  When I type in one word it
finds all titles with the one word.  If I use two words it doesn't work.
How do I change my select statement to make it work?  Thank you.

SELECT *
FROM Titles A, ActorTitle B, Actors C
WHERE A.TitleID=B.TitleID AND B.ActorID=C.ActorID AND A.TitleName LIKE
'%Title%'
GROUP BY A.TitleName ASC

Studios (StudioName, StudioID)
Genres (GenreName, GenreID)
Titles (VideoTitle, Details, StudioID, GenreID, BitRateID, TitleID)
Actors (Name, ActorID)
ActorTitle (TitleID, ActorID)
TitleGenres (TitleID, GenreID)

MYSQL


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL max memory usage on linux/intel

2002-11-21 Thread John Chang
How do I set the cache limit?  Any suggestions on optimizing mySQL?

At 07:05 PM 11/21/2002 +0100, Joseph Bueno wrote:

You can expect that your operating system will use the remaining
memory as a file cache that will speed up your databases accesses.

We don't have that much memory our dedicated database server, it has
only 2 Gb. mysqld itself is using around 600Mb the rest is used
by the OS mainly for file caching. Since the total size of all
databases is around 1.5 Gb they almost fit in memory and the
server is happily serving around 300 queries/s with 200 concurrent
connections and almost no disk I/O (no reads, just a few write
every 5 seconds).

Hope this helps
--
Joseph Bueno

[EMAIL PROTECTED] wrote:

 Apologies if this is off topic ... please let me know what a more
 appropriate forum is if so.

 Quick question:  since there is normally a per-process limit of 4GB on
 32-bit linux/intel platforms is there any point to installing more than
 4gb in an sql server that is only running running 1 instance of the DB
 daemon?
 The total size of the DB is  30 GB and several tables are  4GB.
 --
 -Chris Beck - Coradiant, Inc - Research  Development - +1.514.908.6314-
 -- http://www.coradiant.com - Leaders in Web Performance Optimization --
 --- This email represents my opinion, not that of Coradiant. ---
 We do not inherit the Earth from our Ancestors,
 we borrow it from our Children. -- Indian Proverb




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Dump

2002-11-19 Thread John Chang
After I dump the database what is the command to import it into another 
computer?  Do I have to create a new database and then import all tables 
and data or will it create the database, tables, and data?

MYSQL


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



mysqld cpu load

2002-11-13 Thread John Chang
When MYSQL is being heavily used on a windows cpu, In Task Manager does the 
memory  cpu load increase show the use for mysqld or another process like 
Explorer?


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Windows cnf file location

2002-11-12 Thread John Chang
Where is the config file for MySQL on windows?  Is that where I tell it to 
use a log file?  By default is it off?  Thank you.


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



password MYSQL

2002-11-12 Thread John Chang
I just changed the root password for MYSQL from the default and now it 
gives me the error Access is denied when I try to connect using 
phpMyadmin.  It doesn't even ask for a password.  How can I login 
in?  Thank you.


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Windows cnf file location

2002-11-12 Thread John Chang
Is there a good or bad reason to create the config file in the MySQL folder?

On production servers which logs do you turn on?

Typically what things do you set on in the config file on a production server?

Thank you.

At 10:37 PM 11/12/2002 +0200, you wrote:

Hi!

On Tue, 12 Nov 2002, John Chang wrote:

 Where is the config file for MySQL on windows?  Is that where I tell it to
 use a log file?  By default is it off?  Thank you.

For example, in c:\winnt\my.ini or in c:\my.cnf
You can specify a custom config file location to mysqld with the
--defaults-file=c:\blah.cnf parameter.

You can configure mysqld to use a log file by adding a line

log

into my.cnf.
Query logging is off by default, indeed.

Iikka

**
* Iikka Meriläinen   *
* E-mail: [EMAIL PROTECTED] *
* Vaala, Finland *
**



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: password MYSQL

2002-11-12 Thread John Chang
I tried the first suggestion and it signed in fine.

After emptying the cookies in Netscape and then quitting.  I tried to 
connect to http://localhost/phpMyAdmin-2.3.2/index.php and it never asked 
for a password just gave me:

Error
MySQL said:
Access denied for user: 'root@localhost' (Using password: NO)

How do I pass the password?

At 11:03 PM 11/12/2002 +0200, Iikka Meriläinen wrote:
Hi!

First, try connecting from the command-line mysql client.
mysql -u root -p -h ser.ver.ip.addr
Then enter your password (if you don't have a root password you can dismiss
-p)

Also, if that works, try resetting cookies from your browser, as phpMyAdmin
relies on cookie authentication.

Iikka

On Tue, 12 Nov 2002, John Chang wrote:

 I just changed the root password for MYSQL from the default and now it
 gives me the error Access is denied when I try to connect using
 phpMyadmin.  It doesn't even ask for a password.  How can I login
 in?  Thank you.


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


**
* Iikka Meriläinen   *
* E-mail: [EMAIL PROTECTED] *
* Vaala, Finland *
**


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Indexes LIKE

2002-11-07 Thread John Chang
I was reading through the docs and it says:

The following SELECT statements will not use indexes:

mysql SELECT * FROM tbl_name WHERE key_col LIKE %Patrick%;
mysql SELECT * FROM tbl_name WHERE key_col LIKE other_col;

I am using MYSQL on windows.  So is that true?

When I use the below statement  should I not index TitleName?

SELECT A.TitleName, C.ActorName
FROM Titles A, ActorTitle B, Actors C
Where
A.TitleID=B.TitleID
AND B.ActorID=C.ActorID
AND A.TitleName LIKE '%PartOfName%'
ORDER BY A.TitleName ASC


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: phpmyadmin

2002-10-25 Thread John Chang
If one cannot avoid using PHP how can I secure it?  I will initially have 
it on the same server as IIS.

At 10:40 AM 10/25/2002 -0500, Ed Carp wrote:
 A quick question: Is phpmyadmin secure? Anyone have an negative
 experiences
 having it installed on their server?

PHP itself is not secure unless special steps are taken to secure it, and
even then it's no guarantee.  There have been several exploits published
against PHP, and a few of them have been root exploits.  I avoid PHP when I
can, especially on shared servers.

sql, query


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Another bit off-topic question

2002-10-23 Thread John Chang
I'm planning on using Win2k Adv. server, IIS, MYSQL, PHP on a dual 
processor 2.4GHz processor with 1 or 2GB RAM, with either SCSI or ATA HDs.

The webpage will be dynamic.
1)How many concurrent connections would something like this handle?

2) Will it make a big difference if I use SCSI or ATA?  Example SCSI 1000 
conncetions, ATA 100 connections.  Just want a ball park figure if there is 
a difference.

3) How much RAM do I need for 1000 conncurrent connections?

4) Should I use RAID 1 or 5?  Will it make a big difference if I want 1000 
concurrent connections?

Thank you.


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Bit off topic

2002-10-23 Thread John Chang
I am looking for an external drive case that will be connected to a Xeon
server with SCSI (Ultra-160) interface.  I want something like 6-12
drives.  Anyone have any suggestions?  I do not want to go with Dell, IBM,
etc.  They cost way too much.  I just want one I can build.  Thank you MySQL.


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




PRI key

2002-10-21 Thread John Chang
In MYSQL I'm using MYISAM.  Should the 2 fields in each of the Stars  
TitleGenres
table be Primary keys since they are 'tied' to other fields?

Studios (StudioName, StudioID)
Genres (GenreName, GenreID)
Titles (VideoTitle, Details, StudioID, GenreID, BitRateID, TitleID)
Actors (F_Name, L_Name, ActorID)
Stars (TitleID, ActorID)
TitleGenres (TitleID, GenreID) 


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Select statment

2002-10-20 Thread John Chang
I can't seem to figure out the select statement to get the name. Do I need 
the the StarID or ActorID in Titles table?  Thank you.

I am using PHP and MYSQL.

Studios (StudioName, StudioID)
Genres (GenreName, GenreID)
Titles (VideoTitle, Details, StudioID, GenreID, BitRateID, TitleID)
Actors (F_Name, L_Name, ActorID)
Stars (TitleID, ActorID)
TitleGenres (TitleID, GenreID)


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Normalization sql

2002-10-20 Thread John Chang
What is the Title.ID and Actor.ID?

Will this work if someone is doing a text search on a webpage?  The results 
will go to another page.  Does the below go to the first page or the 
results page?  Thank you.

At 12:20 PM 10/16/2002 -0400, you wrote:
John Chang wrote:




Studios (StudioName, StudioID)
Genres (GenreName, GenreID)
Titles (VideoTitle, Details, StudioID, GenreID, BitRateID, TitleID)
Actors (F_Name, L_Name, ActorID)
Stars (TitleID, ActorID)


TitleGenres (TitleID, GenreID)

So, if I just use theses tables I will be OK if the video has multiple 
titles, multiple actors,  multiple genres?

How do I create a junction table?  Example, between Genres and Titles, 
how do I add the to PK fields to TitleGenres?  Do I just create the 
TitleGenres table and add the TitleID  GenreID field and does the 
database know they are linked?

Sort of; assuming you create a junction table called TitleActors with 
TitleID, ActorID, and you want the movies with Stalone as the actor 
them, you might do a query like:

select * from Titles
   LEFT JOIN TitleActors ON Title.ID = TitleID
   LEFT JOIN Actors ON ActorID = Actors.ID
   WHERE Actors.L_Name = Stalone;

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Navigation bar on left, data on right

2002-10-20 Thread John Chang
I want to be able to create a Navigation bar on the left (Where I can do 
searches, DropDown menu that performs an action)  I want this in all my 
pages but be able to modify it just once.  On the right side I want a way 
of dynamically getting data from a database and showing all searched item 
in 2 columns.  How can I do these 2 things?  Anyone I can talk with who can 
walk me through it?  I've spent days working on it but I just can't get it 
right.  I am using PHP, MYSQL, DW MX to code.


|  Title Header|

|Search  |  Data | Data   |
|Dropdown menu |  Data | Data   |
||  Data | Data   |
||  Data | Data   |
---

Each Data=
--
|   Title|
|  Image  href link |
|  Image_continue   more links  |
|  Image Continue   more links  |
--


Thank you.


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



input data which table first

2002-10-18 Thread John Chang

SQL, Does it matter which table I enter data into first?  Or do I need to 
first
put in the data into Studios, Genres, Actors,  Stars first before adding
to Titles and TitleGenres since they use the IDs of the other table?  Or
should I convert it to type innodb and make the IDs foreign keys in the
Titles and TitleGenres.  And if I do that then will the database allow me
to enter data into Titles or TitleGenre if the data isn't already in the
other tables?  Thank you.

The database type is MYISAM.

Studios (StudioName, StudioID)
Genres (GenreName, GenreID)
Titles (VideoTitle, Details, StudioID, GenreID, BitRateID, TitleID)
Actors (F_Name, L_Name, ActorID)
Stars (TitleID, ActorID)
TitleGenres (TitleID, GenreID)


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



MySQL, Dreamweaver MX, PHP

2002-10-18 Thread John Chang
What I am trying to do is on the first webpage. There is a Studio dropdown 
(information from the MySQL database) menu.  When someone picks a studio 
the results go to a different webpage showing just the movies in that 
studio.  How do I get the results onto the second page?

How can I do it in dreamweaver?


This is from the first page that has the dropdown menu.  Is the method=post 
or get?
?php require_once('Connections/videodb.php'); ?
?php
mysql_select_db($database_videodb, $videodb);
$query_Recordset1 = SELECT * FROM studios ORDER BY studios.StudioName ASC;
$Recordset1 = mysql_query($query_Recordset1, $videodb) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

mysql_select_db($database_videodb, $videodb);
$query_Recordset2 = SELECT * FROM titles;
$Recordset2 = mysql_query($query_Recordset2, $videodb) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?
?php echo ?xml version=\1.0\ encoding=\iso-8859-1\?.; ?

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
/head

body

form action=/VOD/results1.php method=post name=StudioForm 
id=StudioForm
  select name=StudioMenu 
onchange=if(this.selectedIndex!=0){document.StudioForm.submit();} 
class=dropleft
option value=0 ?php if (!(strcmp(0, $row_Recordset2['StudioID']))) 
{echo SELECTED;} ?Studios/option
?php
do {
?
option value=?php echo $row_Recordset1['StudioID']??php if 
(!(strcmp($row_Recordset1['StudioID'], $row_Recordset2['StudioID']))) {echo 
SELECTED;} ??php echo $row_Recordset1['StudioName']?/option
?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
  $rows = mysql_num_rows($Recordset1);
  if($rows  0) {
  mysql_data_seek($Recordset1, 0);
  $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  }
?
  /select
/form
/body
/html
?php
mysql_free_result($Recordset1);

mysql_free_result($Recordset2);
?



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Misunderstandings about SQL

2002-10-15 Thread John Chang

I've been trying for hours to make the dropdown work but to no avail.  I am 
able to get the dropdown to show up but What I want the first item to show 
is Categories.  Next when I choose one of the categories the results show 
only one result regardless of the category I choose.   Thank you.

THIS IS IN THE INDEX.PHP file:::
form name=form1 action=results.php
 select name=ListCategories id=ListCategories class=dropleft 
onChange=if(this.selectedIndex!=0){document.form1.submit();}
   option value=0 ?php if (!(strcmp(0, 
$row_SelAllTitle['Sdo_ID'])))  {echo SELECTED;}?Categories/option
   ?php
do {
?
   option value=?php echo $row_StudioName['Sdo_ID']??php if 
(!(strcmp($row_StudioName['Sdo_ID'], $row_SelAllTitle['Sdo_ID']))) {echo 
SELECTED;} ??php echo $row_StudioName['Sdo_Name']?/option
   ?php
} while ($row_StudioName = mysql_fetch_assoc($StudioName));
   $rows = mysql_num_rows($StudioName);
   if($rows  0) {
   mysql_data_seek($StudioName, 0);
   $row_StudioName = mysql_fetch_assoc($StudioName);
   }
?
 /select
   /form

THIS IS THE RESULT.PHP file:
?php require_once('../Connections/test.php'); ?
?php
mysql_select_db($database_test, $test);
$query_Recordset1 = SELECT * FROM videotitle;
$Recordset1 = mysql_query($query_Recordset1, $test) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?
?php echo ?xml version=\1.0\ encoding=\iso-8859-1\?.; ?

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
/head

body
form name=form1 id=form1 method=post action=
   ?php echo $row_Recordset1['Sdo_ID']; ? ?php echo 
$row_Recordset1['V_ID']; ?
   ?php echo $row_Recordset1['V_image']; ? ?php echo 
$row_Recordset1['40K']; ?
/form
?php echo $row_Recordset1['V_Title']; ?
/body
/html
?php
mysql_free_result($Recordset1);
?



At 11:19 AM 10/15/2002 -0400, you wrote:
I take it you're using DW MX and PHP and MySQL? Great combination! I'm
really glad DW supports this combination now.

What table type (and version of MySQL) are you using. The new version has
innodb table types built in, but you have to decide to use them. It doesn't
happen by default. When you use innodb you can declare columns as foreign
keys and then MySQL will not permit a value to be entered that is not a
Primary Key in the related table.

Suppose you are building the form for your titles table. You need a dropdown
lists for the Studios. So you create two recordsets in the page:

1. Select * FROM Titles;
2. Select StudioID, StudioName FROM Studios;

You tie the form's fields to the first query. You then redefine StudioID as
a dynamic list, and populate it using the second query. It isn't the most
intuitive thing in DW but once you get the hang of it, you can move pretty
quickly.

As for TitleGenres, presumably this would be a related page (it's hard to do
master-detail forms, much easier to do related pages, especially when you're
just starting out). Do you know how to do related pages? If not, go through
the tutorial that shows you how. The manual doesn't contain the example for
PHP/MySQL, you have to go to the DW site and download it from there. I don't
have the URL handy but look around it's easy to spot.

In the TitleGenres page, what will end up getting written to the table will
look something like this:

Title   Genre
1   3   (Comedy, say)
1   4   (Thriller, say)
2   1   (Drama, say)
3   5   (Children's, say)

So you'll create a recordset from the Genres table, populate your dropdown
using the Genre names, and retrieve the GenreID from the control. You then
pass this to the query, which would read something like this:

SELECT VideoTitle, TitleID FROM Titles
INNER JOIN TitleGenres ON Titles.GenreID = Genres.GenreID
WHERE Titles.GenreID = 3

Hope this helps.

For a search page that shows a list of titles by genre, say


-Original Message-
From: John Chang [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 9:31 AM
To: Arthur Fuller
Subject: Re: Misunderstandings about SQL


OK, I'm getting close to understanding.

When I create the Title and Genre tables and then I create the TitleGenre
table.  The database knows that the PK from the 2 tables are foreign keys
in TitleGenre.  Is this correct? OR Is there any command I need to give
when adding the 2 PKs from the other two tables into TitleGenre so that it
will be a foreign key?

So when I create the search on the webpage using dreamweaver do I tell the
front-end to search the Titles table or the whole database to find Genre,
Titles, Actors, or Studios?  I guess I don't understand how the computer
will know what to show on the webpage.  I want all that info to come up and
then when someone clicks

Type

2002-10-14 Thread John Chang

1) Is there a de facto type that is used?  All I will be doing is creating 
a database for use on the web for dynamic webpages.  Basically doing 
searches to the back-end MySQL database.  I figure I don't need to use 
transactional type since I will not be adding any information via a 
front-end.  I will probably load a file whenever I need to add more 
data.  Am I correct?  Or is it always best to use a transactional 
type?  And which transactional type is better/reliable/robust to use?

2) If later on I change my mind and create a webpage as the front-end and 
start inputing data this way will I need a transactional type?

Thank you.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Normalization sql

2002-10-14 Thread John Chang


I've read a bunch about normalization in MySQL and still can't do it very
well.  What I want to normalize is videos (Title, Studios, Actors, Genre,
bitrate).

These are the tables and fields I think it needs.  Is this
normalized?  Thank you.
Table (Fields)
Title (VideoTitle, details, id)
Studio (Name, id)
Actors (F_Name, L_Name, id)
Genre (Name, id)
Bitrate (rate, id)


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Normalization sql

2002-10-14 Thread John Chang

I forgot to add

Video (This has all the Primary key id from the tables below)  Now does it 
work?

My question is how do I get the Primary keys into the video table?  Do I 
just put them in and the database will know it should look in the other 
tables?  How do I connect it?  I read some books but it doesn't tell you 
how to do it. Thanks.

At 04:03 PM 10/14/2002 +0200, Michael Zimmermann wrote:
Hi John,

your design is normalized, but incomplete
and unconnected.

Where do you put the information which actor
was playing in what title, which title was
done in what studio etc. ?

Normalization is a representation technique to
avoid storing *redundant* information. But first
this information has to be there. So first make the
design complete (in an unnormalized way, which fits
the problem), then in a *second* step normalize it.

Greetings
Michael

At Montag, 14. Oktober 2002 14:49 John Chang wrote:
  I've read a bunch about normalization in MySQL and still can't do it very
  well.  What I want to normalize is videos (Title, Studios, Actors, Genre,
  bitrate).
 
  These are the tables and fields I think it needs.  Is this
  normalized?  Thank you.
  Table (Fields)
  Title (VideoTitle, details, id)
  Studio (Name, id)
  Actors (F_Name, L_Name, id)
  Genre (Name, id)
  Bitrate (rate, id)

--
Michael Zimmermann  (http://vegaa.de)


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Normalization sql

2002-10-14 Thread John Chang


Studios (StudioName, StudioID)
Genres (GenreName, GenreID)
Titles (VideoTitle, Details, StudioID, GenreID, BitRateID, TitleID)
Actors (F_Name, L_Name, ActorID)
Stars (TitleID, ActorID)
TitleGenres (TitleID, GenreID)

So, if I just use theses tables I will be OK if the video has multiple 
titles, multiple actors,  multiple genres?

How do I create a junction table?  Example, between Genres and Titles, how 
do I add the to PK fields to TitleGenres?  Do I just create the TitleGenres 
table and add the TitleID  GenreID field and does the database know they 
are linked?

Thank you.


At 09:50 AM 10/14/2002 -0400, Arthur Fuller wrote:
You're starting off ok, just missing the links between the tables. I would
suggest for simplicity though that you change the names of your PKs to
reflect their table, i.e. Title (VideoTitle, Details, TitleID). Otherwise
once you do multi-table queries joins you will have to specify the table
names every time.

A studio makes zero or more titles (videos).
A film belongs to zero or more genres (your answer may be that a film
belongs to precisely one genre)
A title stars one or more actors (you may plan on storing only one, but how
will you decide in a case such as Eight Women?) I would say you need a
junction table between Titles and Actors so you can handle multiple stars.
I'm not sure what BitRate means but I guess it is an attribute of the Title.

Studios (StudioName, StudioID)
Genres (GenreName, GenreID)
Titles (VideoTitle, Details, StudioID, GenreID, BitRateID, TitleID)
Actors (F_Name, L_Name, ActorID)
Stars (TitleID, ActorID)

If you decide that a Title can belong to more than one Genre, then you need
a junction table there too:

TitleGenres (TitleID, GenreID)

This change would involve removing the GenreID from the Titles table.

This design lets you easily find all the titles made by a studio, all the
titles featuring a given actor (even if she is the co-star rather than the
star), all the titles in a genre and even compound queries such as all the
MGM thrillers featuring actor XYZ.

hth,
Arthur

- Original Message -
From: John Chang [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 14, 2002 8:49 AM
Subject: Normalization sql


 
  I've read a bunch about normalization in MySQL and still can't do it very
  well.  What I want to normalize is videos (Title, Studios, Actors, Genre,
  bitrate).
 
  These are the tables and fields I think it needs.  Is this
  normalized?  Thank you.
  Table (Fields)
  Title (VideoTitle, details, id)
  Studio (Name, id)
  Actors (F_Name, L_Name, id)
  Genre (Name, id)
  Bitrate (rate, id)
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
[EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php