Adding a type 'SET' as a mySQL type isn't working!

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
genepilot
Forum Members
Forum Members
Posts: 18
Joined: Wed Feb 27, 2008 4:42 pm

Adding a type 'SET' as a mySQL type isn't working!

Post by genepilot »

I am trying to add a type 'SET' to my database table and the database module is removing the "('Sent', 'Received')" portion of my field list which is causing mysQL to give back an error!  ???

Anybody tried this before?  How do I get around this (aside from manually adding the field in later)?

Thanks,
Brett
Pierre M.

Re: Adding a type 'SET' as a mySQL type isn't working!

Post by Pierre M. »

Hello Brett,
genepilot wrote: I am trying to add a type 'SET' to my database table and the database module is removing the "('Sent', 'Received')" portion of my field list which is causing mysQL to give back an error!  ???
I don't understand how this would be CMSms linked. What is this "database module" ?
Is your question CMSms specific or is it rather a question for the MySQL support forum ?

Pierre M.
genepilot
Forum Members
Forum Members
Posts: 18
Joined: Wed Feb 27, 2008 4:42 pm

Re: Adding a type 'SET' as a mySQL type isn't working!

Post by genepilot »

It is CMSMS related because it is part of the process to create a table for CMSMS.  I have been creating queries for mySQL for years that successfully add a type SET to mySQL tables.  But, whenever I try using the process to create a table that is built into CMSMS, I always get back an error.

I can't believe that nobody else in here has never had a need to create a table that has a type of SET within it.  It isn't like it's a rare thing in the database world and it is actually a better way of doing it than I see among the module code because searching for SET values in a query is faster than searching for Strings, and if you index them the index for a SET is much smaller than an index for a String.
Pierre M. wrote: Hello Brett,
genepilot wrote: I am trying to add a type 'SET' to my database table and the database module is removing the "('Sent', 'Received')" portion of my field list which is causing mysQL to give back an error!  ???
I don't understand how this would be CMSms linked. What is this "database module" ?
Is your question CMSms specific or is it rather a question for the MySQL support forum ?

Pierre M.
Last edited by genepilot on Mon Apr 27, 2009 7:21 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Adding a type 'SET' as a mySQL type isn't working!

Post by Nullig »

I don't believe that the data abstraction layer that CMSMS uses, ADODB (lite), has a field type "SET".

However, you may want to browse through the ADODB manual and forums to find a solution.

Nullig
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: Adding a type 'SET' as a mySQL type isn't working!

Post by Ted »

Correct, this is an adodb lite issue.  Most database abstractions try to not use things that are totally database specific -- especially data types like SET.  Varchar(10) would work just as well and wouldn't be mysql specific.  However, it's something you'd have to take up with them.
Post Reply

Return to “Developers Discussion”