Instr问题 [英] Instr problems
本文介绍了Instr问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个页面使用会话变量来存储像购物车这样的项目,这一切都很好,但我想编写一个删除项目的按钮,我有一个页面,我已经设置了删除功能并尝试了以下代码
I have a page that uses a session variable that stores items like a shopping cart, all this works fine but i am trying to code a button that removes an item, i have a page that i have set up for the remove function and have tried the following code
展开 | 选择 | Wrap | 行号
推荐答案
作为最小量的参数,你需要为instr()提供要搜索的字符串和要查找的字符串。
所以:
As a minimum amount of arguments, you need to provide instr() with the string to search and the string to find.
So:
展开 | 选择 | 换行 | 行号
我理解这一点,但它使用会话变量的sql语句返回错误??
I understand this but it is returning an error with the sql statement that uses the session variable??
展开 | / span> 选择 | 换行 | 行号
你可以在删除项目之前和之后发布会话变量,这样我可以看看吗?
我可能只需稍微修改循环(我没有测试它!)
别介意。
我从这里复制了代码并对其进行了修改。
Can you post here the session variable before and after the items have been removed so I can take a look see?
I probably just need to modify the loop slightly (I didn''t test it!)
Never mind that.
I copied the code from here and modified it.
展开 | 选择 | Wrap | 行号
这篇关于Instr问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文