View Full Version : php & mysql question

25-Aug-06, 13:23
Okay... I've got a question about the SET datatype. Say I've run the following code:

mysql_connect("localhost", "mysql_username", "mysql_password");
$sql = 'CREATE TABLE test(testset SET(\'a\',\'b\',\'c\'))';

Is there a query I can run to get all the possible values of `testset`, and/or one that I can run to add and delete values from `testset`?

For instance, I want to add the possible value 'd' to the set, how would I do it? Also, if I want to echo every possible value of the set into the html, how would I do that

25-Aug-06, 19:46
Hi pultneytooner,

Check this out http://dev.mysql.com/tech-resources/articles/mysql-set-datatype.html

It's information on SET data types, updating, adding, removing etc. and why you may not want to use a SET data type.

Hope it's of use.

26-Aug-06, 09:12
Great link, thanks.