Go Back   Pligg CMS Forum > Pligg Help > Customization Assistance

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-12-2008, 09:23 PM
Casual Pligger
 
Join Date: Feb 2008
Posts: 48
Thanks: 3
Thanked 4 Times in 3 Posts
What's wrong with my function?

I'm trying to customize the latest verion of pligg, I added a new table in mysql called 'stores'. I tried to get the store ID by its domain name. Here's my function in libs/html1.php:

PHP Code:
function get_category($domain){
global 
$db;
$sql "SELECT * FROM " table_stores " WHERE domain = '$domain'";
$result $db->get_results($sql);

    
$catgoryid $result->category_id//category_id is a column name in the table_stores
 
  
return $categoryid;

Right now, this function doesn't return any value.

I've made table_stores as a constant.

Can someone help me out how to retrieve a single record from the database by using get_results?

Last edited by ivytony; 02-12-2008 at 09:40 PM..
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Change injavascript function. ashishhbti General Help 1 01-02-2008 02:05 AM
dbtree.php - Remove tree_to_array2 function? MicroBerto General Help 1 09-19-2007 06:30 PM
[SOLVED] Clean install: Submit New Story = Fatal error: Call to undefined function: starguy Installation and Upgrade Help 4 06-21-2007 11:17 PM
function store() , extended EVB warefare General Help 0 05-10-2007 08:29 PM
Does the Backup function really backup the ENTIRE database? pligguser99 General Help 1 10-08-2006 07:47 PM


Search Engine Friendly URLs by vBSEO 3.2.0