Hello Anton,
i want to give users the possibility enter keywords. The formular for this comes later. For this i have insert a column after keywords named keywords_user so my column keywords not overwritten.
In content_photo.php i have this changed:
In: $sql="select id_parent,quantity......... i have delete the entry keywords.
Then i have insert a new sql query after:
$rs->open($sql);
if(!$rs->eof)
{
$sql="select keywords,keywords_user from photos where published=1 and id_parent=".(int)$id_parent;
$ds->open($sql);
if(!$ds->eof)
{
$keywords_total=$ds->row["keywords"];
// $keywords_total=$ds->row["keywords_user"]; alternatively
}
Bottom i have changed:
$kw="";
$keywords=array();
if($keywords_total!=""){
$keywords=explode(",",str_replace(";",",",$keywords_total));
The change in content_list.php to find the search string:
( added: keywords_user )
$com2.=" (b.title like '%".$sch[$i]."%' or b.description like '%".$sch[$i]."%' or b.keywords like '%".$sch[$i]."%' or b.keywords_user like '%".$sch[$i]."%') ";
So far it's ok. But i have one problem. How can I merge the two columns:
$keywords_total=$ds->row["keywords"];
$keywords_total=$ds->row["keywords_user"];
that i have only one string named: $keywords_total
I have tested UNION and CONCAT but it's not work. Maybe that was not my code correctly.
Can you give me a tip? When it's ok i will post the whole code. This can also take for iptc information in a separated column.
Greetings
Alfred