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

.install file help

Trying to write a .install file for a module and I read through here:

http://drupal.org/node/51220

However, I still cannot get my module to create the table I need.
Hoping someone can point me in the right direction.

Here is the code:

<?php
// item_close.install

function item_close_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
// the {tablename} syntax is so multisite installs can add a
// prefix to the table name as set in the settings.php file
db_query("CREATE TABLE {pm_item_close} (
nid int unsigned NOT NULL default '0',
vid int unsigned NOT NULL default '0',
item_close_date int unsigned NOT NULL default '0',
PRIMARY KEY (vid)
) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;

case 'pgsql':
db_query("CREATE TABLE {pm_item_close} (
nid serial CHECK (nid >= 0),
vid serial CHECK (vid >= 0),
item_close_date serial CHECK (item_close_date >= 0),
PRIMARY KEY (vid)
)");

// Pgsql requires keys and indexes to be defined separately.
// It's important to name the index as {tablename}_fieldname_idx
// (the trailing _idx!) so update scripts can be written easily
db_query("CREATE INDEX {item_close}_field_name_idx
ON {my_table} (field_name)");

Profile error: Attempt to assign property of non-object in //modules/profile.module on line 498.

When accessing profile listings (/profile) I get ~50 times this same error message.

Any hints what might cause this?

Library Catalog / Reference List Module?

I run an academic website, and I am trying to figure out what the best way to set-up a searchable (by keyword) reference list. For example: I would like it if a user wants to see all articles related to youth, then they would just type "youth" into the search box, which would then return a list of all the articles where I have identified "youth" as a keyword. Alternatively, the user could go to a page with all the keywords listed and they could browse that way.

Suggestions?

Thank
-e

E-Commerce

Hi

I tried to install version 4.7 of e-commerce on Drupal 5 but it is giving erros, does anyone know if is there any possible way of installing the E-Commerce 4.7 module on Drupal 5? I'm Realy needing it asap.

Thx

URGENT - E-ticket functionality for eCommerce!!!!

Hi,

I have to build e-ticket functionality onto my site by the end of the week (www.pimpsandhoessociety.org.uk) I already have the eCommerce module installed and running to accept payments of a ticket product I've created (you can't see it on site yet as we're finalising venue details etc.)

However, what I hope someone may have, or have any ideas on how to build (quickly!) is a module to sell e-tickets. That means, if someone orders 3 tickets on the site, before they purchase, they enter the name and e-mail address of each ticket, and this gets added to the guestlist which can then be printed out and e-mail to a mailing list. If you're trying to understand what I'm thinking of, just think of when you book an airline ticket online, you enter details of each passenger when you buy the tickets, and then pay for them altogether in one transaction.

If anyone has developed this and can give me a copy or has a lot of experiance working with the eCommerce APIs (I have none) both would be appreciated to kickstart this. If there's any similar modules that can be customised out there also glad to know about them. I want to get this fully working by the end of the week - got 200 tickets to sell - and if I can't then I'm going to need people to e-mail me names seperately, or even post out printed tickets to the main address holder.

Thanks in advance for any help on this!

Implementing complex search with brackets in 4.7.3 (or any drupal version)

Hello friends,

Has any one ever tried implementing complex search in the search module for drupal (I use 4.7.3)?
I need to get results for a string with multiple AND's/OR's and NOT nested in brackets.
Something like :-
1.(A or (B and C))
2. ((A and B) or (C and D))
I urge the drupal (team) developers to help me get a solution for this.
I had posted for the same purpose last week but got no response.
Hence again making a forum topic.

Please help.

Thnx,
Nilesh.

Pages

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