Forum Statistics

  • Forum Members: 4,502
  • Total Threads: 3,657
  • Total Posts: 1
There are 1 users currently browsing forums.

Partner Sites

Reply
Old 07-10-2009, 01:15 AM   #1 (permalink)
 
Status: Newbie
Join Date: Jun 2009
Posts: 2

Rep Power: 12 jobygolden is on a distinguished road



Default very intersting Variable question

The function calls one variable, which then needs to be placed inside other Session variables to be useful. Dig it >>
--------



function new_sql($object) {

$scratch_id = get_scratch();
$section = $object . "s";

$sql = "INSERT INTO $_SESSION[schema_table]
(
user_id, scratch_id,
entry_type,
content_type, content_subtype, content_label,
urlpath, pagename, section,
title, content, content_format,
collection_array,
order_pref, status
)

VALUES

(
'69', '$scratch_id',
'collection', 'article', '$object', '$_SESSION[new_{$object}_label]',
'$_SESSION[new_{$object}_urlpath]', '$_SESSION[new_{$object}_label]', '$section',
'$_SESSION[new_{$object}_title]', 'TO BE ADDED', 'plain',
'$_SESSION[brand_new_collection_array]',
'title', 'public'
)
";

mysql_query($sql) or die(mysql_error());

} // end function




I'm getting a parse error, for what should be obvious reasons... but do you get the gist of where I need to go with this?

An $object = "issue" or $object = "article" something like that...
__________________
Aprilaire I Best diet pills
jobygolden is offline Add Infraction for jobygolden   Reply With Quote


Reply

Bookmarks

Tags
None


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may post new threads
You may post replies
You may post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.5.0 RC2