DrupalBin
Submit Code
About
Recent Posts
Code
Fix for Fix for Code
Fix for Code
Code
Node type whitelist
an axe coach accessories
coach purses married
Fix for de las ghd alturas
de las ghd alturas
Code
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
sql
test
November 27, 2011 - 7:32pm — Anonymous
SELECT
*
FROM users;
sql
Fix for Same field names in query need aliasing to differentiate :-)
October 11, 2011 - 9:32am —
Sheppard
/**
* Because the field names are both called 'name', this is why the results are borked.
* By aliasing the fieldnames, the problem is circumvented:
* e.g.
sql
Read more
Same field names in query need aliasing to differentiate :-)
October 11, 2011 - 9:22am —
Sheppard
function
qube_companies_per_role
(
$roles
=
''
)
{
$result
=
db_query
(
"SELECT r.name, d.name
FROM {role} r, {term_data} d, {term_access} a
WHERE d.vid = 1
AND a.rid = r.rid
AND a.ti
sql
Read more
Overriding sql
August 10, 2011 - 11:35pm — Anonymous
SELECT aggregator_item.iid
AS
iid,
aggregator_item.title
AS
aggregator_item_title,
aggregator_item.
link
AS
aggregator_item_link,
aggregator_item.timestamp
AS
aggregator_item_timestamp
FROM agg
sql
Read more
Fix for code for gor to see
July 28, 2011 - 12:20am — Anonymous
function
client_search_result
(
$sstr
=
NULL
)
{
if
(
!
$sstr
)
{
drupal_set_message
(
"Search cant be empty"
, error
)
;
drupal_goto
(
'clients'
)
;
}
else
{
$query
=
"SELECT * FROM {clie
sql
Read more
unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
July 27, 2011 - 3:52pm — Anonymous
$result
=
db_query
(
"INSERT INTO {nom_temp}
(usr_email,usr_fname,usr_lname,usr_state,usr_verification, usr_hash, nom_email, nom_fname, nom_lname, nom_state, nom_verification, nom_hash)
Query
sql
Read more
SQL file glue script for dad
August 6, 2010 - 9:32am — Anonymous
#!/usr/bin/env python
# Author: Ben Bradley - bbradley406@gmail.com
# Program for making some changes to a sql file, i dunno
import
sys
def
ioerror
(
reason=
None
)
:
''
'
Used to clean up w
sql
Read more
Views groupby, the hard way
June 29, 2010 - 11:01am — Anonymous
/**
* Implementation of hook_views_pre_execute().
*/
function
mymodule_views_pre_execute
(
&
$view
)
{
if
(
$view
-
>
name
==
"admin"
&&
$view
-
>
current_display
==
"page_1"
)
{
// Manually add a
sql
views
Read more
db_rewrite_sql for filtering on CCK type
June 3, 2009 - 9:02am — Anonymous
/**
* Rewrite search query to search only show results where
* the "status" CCK field is "approved"
*/
5.x
6.x
CCK
drupal
search
sql
Read more
Working NOT EXISTS sql query
April 16, 2009 - 9:05am —
burningdog
#this query now works. It shows me all vehicles which are available on a particular day
SELECT
node
.
nid
AS
nid
,
node
.
title
AS
title
FROM
node
WHERE
(
node
.
STATUS
<>
0
)
mysql
not-exists
sql
Read more
1
2
3
next ›
last »