Custom User Attribute MySql Error HELP!

Permalink
I am trying to create a site where a user can login and edit their profile page which includes questions about their family. I needed and attribute that is a lot like the address attribute but instead of addresses I need names and ages of children.
Using the address attribute as my starting point (copy and pasted then changed the name of the folder in my site's root models directory) and following the tutorial on custom attributes I made a new attribute that asks for firstname/lastname/age/conference.
The custom attribute successfully installs and displays wonderfully. But when I enter information and then hit save I get this error message:

mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from atChildAddress where avID = '34'' at line 1] in EXECUTE("select avID, firstname, lastname, age, conferance, from atChildAddress where avID = '34'")

where my custom attribute is child_address

The weird thing is that the attribute is successfully creating a table in the database (atChildAddress) and when I check the DB table it has the information in it from the test run. (e.g. 1 row with a all the columns filled in as per my test run).

Any Ideas? Attached is the controller.php I'm using.

1 Attachment

cannonf700
 
skote replied on at Permalink Best Answer Reply
You have an extra comma after "conferance" which is causing your SQL statement to fail.

$value = $db->GetRow("select avID, firstname, lastname, age, conferance, from atChildAddress where avID = ?", array($avID));


should be

$value = $db->GetRow("select avID, firstname, lastname, age, conferance from atChildAddress where avID = ?", array($avID));
cannonf700 replied on at Permalink Reply
cannonf700
Thaaaaaaaaaaaaaaaaaaaaaank YOUUUUUUU!

Man, I don't know how I didn't see that? I could have sworn I checked that vary thing. I think after looking at it for so long the letters started to act like ants moving around on me.

Thank You again! Saved me!