Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d80a410b
Commit
d80a410b
authored
May 24, 2006
by
drumm
Browse files
#64951
by deepstar, Ambiguous query in taxonomy_get_term_by_name()
parent
d7f3ace2
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/taxonomy.module
View file @
d80a410b
...
...
@@ -997,7 +997,7 @@ function _taxonomy_term_children($tid) {
* An array of matching term objects.
*/
function
taxonomy_get_term_by_name
(
$name
)
{
$db_result
=
db_query
(
db_rewrite_sql
(
"SELECT t.tid, t.* FROM
{
term_data
}
t WHERE LOWER('%s') LIKE LOWER(name)"
,
't'
,
'tid'
),
trim
(
$name
));
$db_result
=
db_query
(
db_rewrite_sql
(
"SELECT t.tid, t.* FROM
{
term_data
}
t WHERE LOWER('%s') LIKE LOWER(
t.
name)"
,
't'
,
'tid'
),
trim
(
$name
));
$result
=
array
();
while
(
$term
=
db_fetch_object
(
$db_result
))
{
$result
[]
=
$term
;
...
...
modules/taxonomy/taxonomy.module
View file @
d80a410b
...
...
@@ -997,7 +997,7 @@ function _taxonomy_term_children($tid) {
* An array of matching term objects.
*/
function
taxonomy_get_term_by_name
(
$name
)
{
$db_result
=
db_query
(
db_rewrite_sql
(
"SELECT t.tid, t.* FROM
{
term_data
}
t WHERE LOWER('%s') LIKE LOWER(name)"
,
't'
,
'tid'
),
trim
(
$name
));
$db_result
=
db_query
(
db_rewrite_sql
(
"SELECT t.tid, t.* FROM
{
term_data
}
t WHERE LOWER('%s') LIKE LOWER(
t.
name)"
,
't'
,
'tid'
),
trim
(
$name
));
$result
=
array
();
while
(
$term
=
db_fetch_object
(
$db_result
))
{
$result
[]
=
$term
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment