How do I get a value from a select query and assign it to a variable that I can be placed in the session var

I want to get the current user's zip code from a filed attached to the user record for the current user, the query below should do that. Then I want to execute the query returning a single record with a single field. I figure if I then assign that value to a variable and then put it in the session array I can use it later to filter content with views that have a zip code field. What I have so far doesn't work and I think it is because I have no clue how to get the value out of the field.

Looking for a local Drupal developer within the Houston, Texas Area

I am looking for a Drupal developer that is local to the Houston, Texas Area. I am looking to either hire either under a long term maintenance contract or as an employee. Please respond to resume@dlzpgroup.com.

md5 of same string producting different results ...

I've been wracking my brains over this issue over the weekend, and hope someone else can shed light on this ...

I have a table of values that I'm trying to pull into a View ... I want to do grouping, where I'm doing a strcmp between row[0] and row[1], performing an operation *only* when the values are different ...

If I go into the database, and do, as an example:

# select md5(title) from node where title ~* 'serious coffee';
md5
----------------------------------
1c0fcd7bb8ce7033e41958ef6b0f5c2d
1c0fcd7bb8ce7033e41958ef6b0f5c2d
1c0fcd7bb8ce7033e41958ef6b0f5c2d
1c0fcd7bb8ce7033e41958ef6b0f5c2d
1c0fcd7bb8ce7033e41958ef6b0f5c2d
1c0fcd7bb8ce7033e41958ef6b0f5c2d
1c0fcd7bb8ce7033e41958ef6b0f5c2d
1c0fcd7bb8ce7033e41958ef6b0f5c2d
1c0fcd7bb8ce7033e41958ef6b0f5c2d
1c0fcd7bb8ce7033e41958ef6b0f5c2d
(10 rows)

all 10 records are shown to be identical (as I expect them to be) ...

in my view template, I'm doing a printf:

printf("%d:%s%s %d:%s:%s
", $count-1, $rows[$count-1]['title'], md5($rows[$count-1]['title']), $count, $rows[$count-1]['title'], md5($rows[$count]['title']));

that is *should* output the same values for the same records above, but they end up with *each* title having a different md5 checksum even though the text looks to be identical:

2:Serious Coffee:ff64701d5b01ae900d997ebda72e191b

Full width header

Dear fellow drupal users,

I had a question:

Is there a way to edit the header just like the footer (full screen width) from this theme?"

http://drupal.org/project/andromeda

Thnx in advance,

Tom Rutten

Inserting values using javascript

Hi there
I need to be able to fill out a text field using javascript that is supplied by a js script within an iframe.
This could have countless uses and I have found very handy. In this case I am using it for an events entry page that allows the user to enter a position by clicking on a Google map.
I am very new to Drupal so this project is a huge undertaking though I always like to jump in the deep end.
I have this script working on a standard website though I am not sure how to go about it in Drupal.
The iframe is a google map that enters the coords of a clicked position on the map into a text field that has a name of 'thepos' and is in a form called 'thereceiver'. The js functions are contained in the iframe and access the parent page to insert the value.
Firstly I want the map to show up within a form called 'thereceiver'.
Next I need to create either a text field or a hidden field within 'thereceiver' that can accept the value passed by javascript to 'thepos'.
I then must be able to store the value with all others that are part of the form in the database.
From here the values of the database table need to be entered to an xml file via a PHP function for later use. This xml is used by a flash file later as part of the event display map.

Deploying from Windows Dev to Unix Server

A client's website is hosted on a Unix server. They want a Drupal website developed which is fine, but I have next to no experience with Unix hosting.

My question is, can I develop on Windows, and deploy to Unix? If so, how?

Regards

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x