busboy
October 30, 2014, 9:18pm
1
I don’t understand why I am getting the error, “Unknown column c.dateAdded in field list”. This field really does exist and I spelled it correctly.
Thoughts?
Thanks!
SELECT
c.cID,
c.dateAdded,
c.tID,
c.action,
c.status,
c.length,
c.dateStarted,
c.dateEnded,
t.title
FROM compliance c, testimonies t
WHERE
c.adminID = 717
and c.tID = t.tID
Is it actually part of the testimonies table and should be t.dateAdded?
busboy
October 30, 2014, 9:32pm
3
The testimonies table also has a dateAdded column, but to answer your question, no. I’m trying to get the dateAdded from the compliance table for this example.
r937
October 30, 2014, 10:25pm
4
please run this and show us the full results –
SHOW CREATE TABLE compliance
busboy
October 31, 2014, 12:23am
5
CREATE TABLE compliance
(
cID
int(11) unsigned NOT NULL AUTO_INCREMENT,
tID
int(5) unsigned NOT NULL DEFAULT ‘0’,
authorID
int(5) unsigned NOT NULL DEFAULT ‘0’,
adminID
int(5) unsigned DEFAULT NULL,
action
varchar(10) CHARACTER SET latin1 DEFAULT NULL,
status
varchar(10) CHARACTER SET latin1 DEFAULT NULL,
length
int(5) unsigned NOT NULL DEFAULT ‘0’,
dateStarted
datetime DEFAULT NULL,
dateEnded
datetime DEFAULT NULL,
PRIMARY KEY (cID
)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8
I admit I could use a new pair of eyeglasses, but I’m not seeing a dateAdded field in that.
4 Likes
system
Closed
January 30, 2015, 7:28am
7
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.