Reputation: 3
I want to use str_replace() in SQL query,
db_query('SELECT * FROM {node} n INNER JOIN {accesslog} a ON n.nid = str_replace("node/", "", a.path);
but still not work. please help.
thank you.
Upvotes: 0
Views: 188
Reputation: 799062
Pick a function that the SQL engine does know, such as REPLACE()
.
Upvotes: 6