This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Help for a SQL error

I am getting this error when I try to submit a story:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND th.tid IS NULL' at line 1 query: SELECT DISTINCT td.tid FROM term_data td LEFT JOIN term_hierarchy th on td.tid = th.parent WHERE td.vid IN (8) AND td.tid IN (11,0,) AND th.tid IS NULL in C:\Program Files\xampp\htdocs\drupal\includes\database.mysql.inc on line 172

I am using XAMMP,

PHP: 4.4.0 MYSQL: 5.0.27

installed modules:
02/06/2007 12:22 PM aggregator
02/18/2007 02:32 PM bbcode
02/06/2007 12:22 PM block
02/06/2007 12:22 PM blog
02/06/2007 12:22 PM blogapi
02/06/2007 12:22 PM book
02/13/2007 03:57 PM ck
02/06/2007 12:22 PM color
02/06/2007 12:22 PM comment
02/06/2007 12:22 PM contact
02/06/2007 12:22 PM drupal
02/12/2007 12:16 PM ed_readmore
02/06/2007 12:22 PM feedback
02/06/2007 12:22 PM filter
02/06/2007 12:22 PM forum
02/12/2007 03:46 PM front
02/06/2007 12:22 PM help

News posting module

What is best module for news posting. where only news with heading & descriptions are shown.

thaks,

Why I'm getting an empty record in users table?

Hi, I'm creating a new module which among its many functions adds a new node type.

Sometimes when I create one of these nodes an empty record is added to the users table, a record with uid = 0 and all the other fields null or empty.

I'm using hook_insert() in it's simplest form in my module:

tinyMCE thread, again! ;)

If someone would like to work with a tinyMCE module. Well, then I think they should have a look at this:
http://p4a.crealabsfoundation.org/tinymcpuk

It's freaki'n wonderfull :)

Can someone make a mod?

I'd like to be able to give certain users (moderators) access to edit comments, but not to administer them. Any ideas?

Up to date forms information

Is there any up to date information anywhere on the forms API for 5.1? There's loads of stuff about forms scattered around drupal.org, but it all is either dated, contradictory or just plain wrong. I'm having hell of a time working out how all this forms stuff works!

Most searches lead here:

http://api.drupal.org/api/HEAD/file/developer/topics/forms_api.html

but the code on that page described as "a working piece of code" crashes PHP on my machine! Actually, the line at the bottom:

$output = drupal_get_form('test_page', $form);

seems to call the test_page() function recursively, which causes PHP to abort or something. Also, what's that second parameter? The API docs don't describe what it's doing, and the example code doesn't even take a parameter. I can't even see what it's trying to do.

Floundering around by myself, I discovered that this seems closer to a starting point:

function example_form1()
{
  $form['field_2'] = array(
    '#type'          => 'submit',
    'value'         => t('Submit')
  );

  return $form;
}

function testForm()
{
  $content = drupal_get_form('example_form1');
  print theme( 'page', $content );
}

only since I missed the '#' from the '#value' array element, this also causes PHP to bomb out, this time with a memory leak.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions