Caithness Map :: Links to Site Map Paying too much for broadband? Move to PlusNet broadband and save£££s. Free setup now available - terms apply. PlusNet broadband.  
Results 1 to 3 of 3

Thread: php & mysql question

  1. #1
    Join Date
    Mar 2006
    Posts
    1,350

    Default php & mysql question

    Okay... I've got a question about the SET datatype. Say I've run the following code:

    <?php
    mysql_connect("localhost", "mysql_username", "mysql_password");
    mysql_select_db("mysql");
    $sql = 'CREATE TABLE test(testset SET(\'a\',\'b\',\'c\'))';
    mysql_query($sql);
    ?>
    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

  2. #2
    Join Date
    Mar 2003
    Location
    Wick
    Posts
    1,020

    Default ... yes ...

    Hi pultneytooner,

    Check this out http://dev.mysql.com/tech-resources/...-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.
    Kind regards,

    Paul Broadwith
    Blue Ivy Ltd, Wick - Certified Microsoft Small Business Specialist

  3. #3
    Join Date
    Mar 2006
    Posts
    1,350

    Default

    Great link, thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •