SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
February 10, 2012, 07:15:00 am

Login with username, password and session length
Members
Total Members: 9903
Latest: jaredvaldez2
Stats
Total Posts: 27784
Total Topics: 4859
Online Today: 76
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 66
Total: 66
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Custom Fields (Select Field) error [{$db_prefix}]  (Read 917 times)
Darkshadow
Newbie
*
Offline Offline

Posts: 38


View Profile WWW
« 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:
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 » Logged

Dark Mysterious Worlds Look here...

We develope an brand new fantasy roleplay tradingcardgame in english and german

Samples Look here...
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
by exit
[Today at 06:10:53 am]

[Today at 03:46:15 am]

[Today at 02:30:16 am]

[Today at 02:29:51 am]

[February 09, 2012, 05:30:55 pm]

by exit
[February 09, 2012, 04:47:13 pm]

[February 08, 2012, 09:09:16 pm]

[February 08, 2012, 09:11:02 am]

[February 08, 2012, 09:07:32 am]

[February 08, 2012, 03:46:49 am]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.187 seconds with 20 queries.