开发者

I want to use php function in SQL query,

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开发者_C百科); 

but still not work. please help.

thank you.


Pick a function that the SQL engine does know, such as REPLACE().


Use MySQL's REPLACE function instead of PHP's str_replace.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜