Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12375
Latest: scuzzy
New This Month: 2
New This Week: 1
New Today: 1
Stats
Total Posts: 40218
Total Topics: 7083
Most Online Today: 122
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 62
Total: 63

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

+- Recent Topics

Download System Lite by Rock Lee
June 03, 2020, 07:34:24 pm

Font question by SMFHacks
May 27, 2020, 08:15:26 am

Error message with latest SMF 2.1 Github build by Hatshepsut
May 25, 2020, 01:43:26 am

smfblog not working on 2.0.17 by tech9
May 20, 2020, 01:44:34 pm

Copyright removal by stbc
May 18, 2020, 01:27:57 am

Mod Verified User i can't square the image by Rock Lee
May 07, 2020, 07:56:10 pm

SMF4Mobile 2.0 released for SMF 2.0.x by SMFHacks
May 06, 2020, 12:13:14 pm

SMF Social Login Pro - Discontinued? by Nicole
May 02, 2020, 05:47:04 pm

Likes by SMFHacks
April 30, 2020, 09:50:35 pm

Upgrade Issue - by SMFHacks
April 28, 2020, 12:40:13 pm

Powered by EzPortal