Questions and discussions

Keyword search enlargement

Script's setup and configuration

Keyword search enlargement

Postby funmediapicture » Sat Oct 23, 2010 11:45 am

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:


$sql="select keywords,keywords_user from photos where published=1 and id_parent=".(int)$id_parent;
// $keywords_total=$ds->row["keywords_user"]; alternatively

Bottom i have changed:


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:


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.

Posts: 73
Joined: Tue Apr 27, 2010 2:45 pm

Return to Configuration

Who is online

Users browsing this forum: No registered users and 9 guests

  Photo Store Script

Professional php photo stock script and WordPress plug-in for photographers and video producers.

  CMSaccount Inc.