Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4229
Latest: Ghost
New This Month: 3
New This Week: 0
New Today: 0
Stats
Total Posts: 43077
Total Topics: 7493
Most Online Today: 62
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 72
Total: 72

Author Topic: Custom Fields (Select Field) error [{$db_prefix}]  (Read 2955 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
7439 Views
Last post June 21, 2009, 08:35:51 pm
by SMFHacks
1 Replies
3823 Views
Last post February 26, 2009, 11:26:31 pm
by SMFHacks
15 Replies
12736 Views
Last post August 16, 2009, 12:53:38 am
by Vincent Volmer
1 Replies
3605 Views
Last post September 17, 2010, 09:09:31 am
by Vincent Volmer
0 Replies
2909 Views
Last post July 22, 2011, 05:02:43 am
by Xtreme4U2NV

+- Recent Topics

Version 6.1.6 issues by SMFHacks
September 25, 2023, 09:52:10 am

Follow / Follower Mod? by SMFHacks
September 23, 2023, 08:44:44 am

Looking for a good video player by replayuk
September 23, 2023, 12:17:39 am

[Mod]Discord Web Hooks by SMFHacks
September 22, 2023, 03:57:28 pm

SMF 2.1.4 Search by Anmer
September 22, 2023, 01:55:15 pm

Error in thise mode by Ghost
September 15, 2023, 08:42:24 am

Gallery Selection List Order by mickjav
September 07, 2023, 12:46:31 pm

[Mod]Tidy Child Boards 2.0 by Norwinjose
September 02, 2023, 11:42:54 am

PrettyUrls SEO Pro: Unable to submit sitemap to google search conmsole by SMFHacks
August 31, 2023, 10:55:22 am

PrettyURL - SEO4SMF Rewrites? by SMFHacks
August 28, 2023, 06:35:33 pm

Powered by EzPortal