Closed psegovias closed 9 years ago
Hi @psegovias,
such a question is related to MySQL and not to TCAT.
You could consider relieving the NULL constraint from the column.
Best,
Erik
HI @ErikBorra sorry again, but can u guide me on this?
You say delete the "NOT NULL" when its created the bin?
Regards!
ALTER TABLE XXX_tweets ALTER COLUMN starred varchar(64) NULL DEFAULT '';
This will remove the NOT NULL constraint.
Ok already done that yesterday, the problem with that its when i have this mysql sentence: ( I must only see mentions "starred" )
$sql = "SELECT * FROM " . $esc['mysql']['dataset'] . "_tweets t "; $where = "starred NOT IN ('No') AND"; $sql .= sqlSubset($where); $sql .= " ORDER BY created_at DESC";
I cant see new mentions, cuz (i think) starred is NULL, any idea?
$sql = "SELECT * FROM " . $esc['mysql']['dataset'] . "_tweets t ";
$where = "starred NOT IN ('No') AND starred IS NOT NULL AND STARRED != '' AND ";
$sql .= sqlSubset($where);
$sql .= " ORDER BY created_at DESC";
Thanks @ErikBorra :)
I add a new column to _tweets its called "starred" i use a MYSQL UPDATE to change this to 'yes' or 'no'.
Add them to capture/common/functions.php
starred
varchar(64) NOT NULL DEFAULT '',Sometimes when i track via search.php i got this error and no tweets are inserted:
insert into table XXX_tweets failed with '23000: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'starred' cannot be null'
Any ideas?