Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12358
Latest: KekoWorld
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 40096
Total Topics: 7060
Most Online Today: 79
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 56
Total: 56

Author Topic: Custom Fields (Select Field) error [{$db_prefix}]  (Read 2556 times)

0 Members and 1 Guest are viewing this topic.

Offline Darkshadow

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Dark Mysterious Worlds
Custom Fields (Select Field) error [{$db_prefix}]
« on: May 15, 2009, 03:14:14 am »
ok, i have an item and want add a custom listfield, after i added them i want to enter the list entrys.

Now the problem occur,: error message: field item_custom_field not found
after i fix it in the store.php (look in added code)

next error occur: field store_item not found
after i fix it in the store.php (look in added code)

everything worked fine...


My working fix:

Code: [Select]
function ManageSelectBox()
{
global $context, $txt, $mbname;

isAllowedTo('smfstore_manage');

$id = (int) $_REQUEST['id'];

$context['store_selectid'] = $id;

$context['page_title'] =  $mbname . ' - ' . $txt['store_txt_maange_select_fields'];

$context['sub_template']  = 'manage_select';

// Get item id
$dbresult = db_query("
SELECT
title, ID_ITEM
FROM smf_store_item_custom_field
WHERE ID_FIELD = $id  LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($dbresult);
mysql_free_result($dbresult);



// Get Product Name
$dbresult = db_query("
SELECT
productname
FROM smf_store_item
WHERE ID_ITEM = " . $row['ID_ITEM'] . " LIMIT 1", __FILE__, __LINE__);
$productRow = mysql_fetch_assoc($dbresult);
mysql_free_result($dbresult);



But this should not a permanent solution, plese fix the {$db_prefix} in this area, so it contained the "smf_" prefix

I have no idea why to hell the string "smf_" are lost in this area... The "AddSelect()" function after the "ManageSelectBox()" function work with the {$db_prefix} without problems...

Please respond to my other errors i postet yesterday in classifieds system...

Darkshadow
« Last Edit: May 15, 2009, 03:43:28 am by Darkshadow »

 

Related Topics

  Subject / Started by Replies Last post
10 Replies
6664 Views
Last post June 21, 2009, 08:35:51 pm
by SMFHacks
1 Replies
3118 Views
Last post February 26, 2009, 11:26:31 pm
by SMFHacks
15 Replies
10969 Views
Last post August 16, 2009, 12:53:38 am
by Vincent Volmer
1 Replies
2879 Views
Last post September 17, 2010, 09:09:31 am
by Vincent Volmer
0 Replies
2250 Views
Last post July 22, 2011, 05:02:43 am
by Xtreme4U2NV

+- Recent Topics

[Mod]Telegram AutoPost Bot by SMFHacks
April 06, 2020, 03:38:36 pm

[Mod]SMF2WPBridge - Wordpress Login Bridge by SMFHacks
April 04, 2020, 07:16:59 pm

BUG Message Editor Pro1.0.5 by marcimila
April 04, 2020, 09:01:21 am

MOVED: BUG Message Editor Pro1.0.5 by SMFHacks
April 03, 2020, 07:54:07 pm

Only variables should be passed by reference by Zaphod
April 02, 2020, 11:19:11 am

Cannot install Gallery Pro on SMF 2.1 RC2 by Hatshepsut
March 19, 2020, 12:55:00 am

Newbie questions by SMFHacks
March 08, 2020, 09:28:17 am

Update detect mobile mode PHP5 to PHP7 by Plus
March 05, 2020, 11:19:05 am

Just a hello by Plus
March 05, 2020, 11:05:56 am

Enotify Copyright Problem by SMFHacks
March 04, 2020, 09:21:09 pm

Powered by EzPortal