Dynamic link

2006-07-05 Thread z247

Say I have two regular tables (table1, table2) and what a column (status) in
the second table to update when it changes in table1. For example, if I set
the status for a user in table1 to 0, the status for all that user's
records in table2 dynamically changes to 0. 

Can this be done? What method is used?

Thank you
-- 
View this message in context: 
http://www.nabble.com/Dynamic-link-tf1896489.html#a5187212
Sent from the MySQL - General forum at Nabble.com.


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



RE: Dynamic link

2006-07-05 Thread z247

Is this the only option? I get Access denied.

CREATE TRIGGER ins_sum BEFORE INSERT ON account
FOR EACH
ROW SET @sum = @sum + NEW.amount;

MySQL said: Documentation
#1227 - Access denied; you need the SUPER privilege for this operation

This is sample code from mysql site,
http://dev.mysql.com/doc/refman/5.1/en/using-triggers.html

Thank you
-- 
View this message in context: 
http://www.nabble.com/Dynamic-link-tf1896489.html#a5188173
Sent from the MySQL - General forum at Nabble.com.


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



Re: Dynamic link

2006-07-05 Thread z247

How would a foreign key constraint work in this case?

Thank you
-- 
View this message in context: 
http://www.nabble.com/Dynamic-link-tf1896489.html#a5188192
Sent from the MySQL - General forum at Nabble.com.


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



Newbie - CREATE VIEW Question

2006-07-04 Thread z247

Say I have the following tables;

siteID,name
--
site1, XYZ
site2, RSQ

ID,site,data

1, site1, M
2, site2, Q
3, site2, Y
4, site1, P 

... etc.

And I want to create a view like this;


siteID,name,data
--
site1, XYZ, (M,P)
site2, RSQ, (Q,Y)

where all the related column data in the second table is placed in another
column. How can I do this? Is there a function that can group these values
into one variable or array?

Thank you

-- 
View this message in context: 
http://www.nabble.com/NewbieCREATE-VIEW-Question-tf1890326.html#a5168593
Sent from the MySQL - General forum at Nabble.com.


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



Re: Newbie - CREATE VIEW Question

2006-07-04 Thread z247

Thank you!
-- 
View this message in context: 
http://www.nabble.com/NewbieCREATE-VIEW-Question-tf1890326.html#a5171108
Sent from the MySQL - General forum at Nabble.com.


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



Re: Newbie - CREATE VIEW Question

2006-07-04 Thread z247

Hi, the GROUP_CONCAT worked. Thank you. However, I'm getting duplicates in
the all_data column. Is there a function like array_unique in PHP to
remove these duplicates? 

I tried DISTINCT but that did not work.

Thank you.
-- 
View this message in context: 
http://www.nabble.com/NewbieCREATE-VIEW-Question-tf1890326.html#a5171910
Sent from the MySQL - General forum at Nabble.com.


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