Weird Database error

When i go to profiles.php from the admin panel it gives me this weird message. Can anyone please help me or give me somewhat of a walkthru on what I should do? Any help is appriciated. Thank You.

Database query error
Query:
SELECT `Profiles`.`ID` as `ID`, `NickName`, `Email`, `Sex`, DATE_FORMAT(`DateLastLogin`, '%m-%d-%y %H:%i' ) AS `DateLastLoginCur`, DATE_FORMAT(`DateReg`, '%m-%d-%y %H:%i' ) AS `DateReg`, `Status` FROM `Profiles` WHERE 1 AND (`Couple`=0 OR `Couple`>`Profiles`.`ID`)
Mysql error:
Unknown column 'Sex' in 'field list'
---------------------------------------------------------------
Found error in file /home/hardtime/public_html/admin/profiles.php
at line 184. Called db_res function with erroneous argument #0

Debug backtrace:
Array
(
[1] => Array
(
[file] => /home/hardtime/public_html/admin/profiles.php
[line] => 184
[function] => db_res
[args] => Array
(
[0] => SELECT `Profiles`.`ID` as `ID`,
`NickName`,
`Email`,
`Sex`,
DATE_FORMAT(`DateLastLogin`, '%m-%d-%y %H:%i' ) AS `DateLastLoginCur`,
DATE_FORMAT(`DateReg`, '%m-%d-%y %H:%i' ) AS `DateReg`,
`Status`

FROM `Profiles`


WHERE 1 AND (`Couple`=0 OR `Couple`>`Profiles`.`ID`)
)

)

)
Called script: /admin/profiles.php
Request parameters:
Array
(
[strSec] => 7cf5a4770f7d67f460451022f31cd5bc
[memberID] => 2
[memberPassword] => d0c685bb6759bb6ab7a65494a2a3b2cb
[adminID] => ******
[adminPassword] => ******
)
Quote · 13 Aug 2009

This may not be so but look into your database in the Profiles table and see if you see a Sex column in there.
It sounds like the column may have been removed or something.

I'm no expert in this field but it's worth the shot.
Hope you get the right answer and it works.

Be a dolphin, be creative in you own way and you will attract a audience
Quote · 13 Aug 2009

Actually Wolf is exactly right, your missing the Sex column in the Database tables, but it's in the file or it's in the database but not in the file admin/profile.php on line

 

Good job wolf

Quote · 13 Aug 2009

Yeah your right I took a look and its not in my database. Does anyone know the right sql query for dolphin 6.1.6 so I can add it to my profiles database table? For the sex column only i mean. Thank you so much.

Quote · 13 Aug 2009

Adding it back in the database can be done with this sql code.

ALTER TABLE `Profiles` ADD `Sex` varchar(255) NOT NULL default '';

However, because that field is missing, the sex is missing from every ones profile. When you add it back in, it will be null for all profiles. So each members gender will have to be set by hand for every profile you have on your site.

You may want to look at your fields builder in admin as well. The sex field is used in a number of locations. See if those are missing. Should exist in every page in the fields builder.

You must have done something recently to cause the loss of that field. If you have a recent DB backup it may be wise to restore it. Fixing the gender of all profiles by hand will be a time consuming task.


https://www.deanbassett.com
Quote · 13 Aug 2009

INSERT INTO `ProfileFields` VALUES(10, 'Sex', 'select_one', 'radio', '', NULL, NULL, '#!Sex', 'LKey', '', 0, 'male', 1, 0, 0, 20, 1, 17, 3, 17, 3, 17, 3, 17, 2, 17, 4, 17, 4, 17, 2, '', 17, 2, 0, NULL, 17, 2, 11, 40);

Quote · 13 Aug 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.