1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-29 10:38:08 +01:00

content: added table prefix in db_select_gen

This commit is contained in:
lia 2007-01-17 14:05:41 +00:00
parent 0465efe1d1
commit 6bda84de8a
2 changed files with 11 additions and 11 deletions

View File

@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_class.php,v $
| $Revision: 1.6 $
| $Date: 2007-01-15 14:00:21 $
| $Revision: 1.7 $
| $Date: 2007-01-17 14:04:31 $
| $Author: lisa_ $
+---------------------------------------------------------------+
*/
@ -707,8 +707,8 @@ class content{
global $plugintable, $sql;
$qry = "
SELECT c.*, p.*
FROM pcontent as c
LEFT JOIN pcontent as p ON p.content_id = c.content_parent
FROM #pcontent as c
LEFT JOIN #pcontent as p ON p.content_id = c.content_parent
WHERE c.content_id = '".intval($id)."' ";
$sql -> db_Select_gen($qry);
$row2 = $sql -> db_Fetch();

View File

@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/content/search/search_parser.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:35:08 $
| $Author: mcfly_e107 $
| $Revision: 1.2 $
| $Date: 2007-01-17 14:05:19 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
*/
@ -58,19 +58,19 @@ function search_content($row) {
if($row['content_parent'] == '0'){
$qry = "
SELECT c.content_heading
FROM pcontent as c
FROM #pcontent as c
WHERE c.content_id = '".$row['content_id']."' ";
}elseif(strpos($row['content_parent'], "0.") !== FALSE){
$tmp = explode(".", $row['content_parent']);
$qry = "
SELECT c.content_heading
FROM pcontent as c
FROM #pcontent as c
WHERE c.content_id = '".intval($tmp[1])."' ";
}else{
$qry = "
SELECT c.*, p.*
FROM pcontent as c
LEFT JOIN pcontent as p ON p.content_id = c.content_parent
FROM #pcontent as c
LEFT JOIN #pcontent as p ON p.content_id = c.content_parent
WHERE c.content_id = '".$row['content_id']."' ";
}