fixed id bug
git-svn-id: http://yolanda.mister-muffin.de/svn@121 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
a840ef5c03
commit
b30e62b40d
1 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@ if($query->param('title') or $query->param('id'))
|
|||
if($query->param('id'))
|
||||
{
|
||||
#if id is passed ignore title and check for the id
|
||||
$sth = $dbh->prepare(qq{select id, title, description, userid, from_unixtime( timestamp ),
|
||||
$sth = $dbh->prepare(qq{select title, description, userid, from_unixtime( timestamp ),
|
||||
creator, subject, contributor, source, language, coverage, rights, license
|
||||
from videos where id = ? }) or die $dbh->errstr;
|
||||
$rowcount = $sth->execute($query->param('id')) or die $dbh->errstr;
|
||||
|
@ -33,7 +33,7 @@ if($query->param('title') or $query->param('id'))
|
|||
else
|
||||
{
|
||||
#if no id was passed there has to be a title we search for
|
||||
$sth = $dbh->prepare(qq{select id, title, description, userid, from_unixtime( timestamp ),
|
||||
$sth = $dbh->prepare(qq{select title, description, userid, from_unixtime( timestamp ),
|
||||
creator, subject, contributor, source, language, coverage, rights, license
|
||||
from videos where title = ? }) or die $dbh->errstr;
|
||||
$rowcount = $sth->execute($query->param('title')) or die $dbh->errstr;
|
||||
|
@ -43,7 +43,7 @@ if($query->param('title') or $query->param('id'))
|
|||
#if there was a title passed, then perform a search
|
||||
if($rowcount == 0 and $query->param('title'))
|
||||
{
|
||||
$sth = $dbh->prepare(qq{select id, title, description, userid, from_unixtime( timestamp ),
|
||||
$sth = $dbh->prepare(qq{select title, description, userid, from_unixtime( timestamp ),
|
||||
creator, subject, contributor, source, language, coverage, rights, license
|
||||
from videos where match(title, description, subject) against( ? ) }) or die $dbh->errstr;
|
||||
$rowcount = $sth->execute($query->param('title')) or die $dbh->errstr;
|
||||
|
|
Loading…
Reference in a new issue