★跪地哭泣PHP建立SQL临时表后无法访问!

WBOY
Release: 2016-06-13 10:08:23
Original
715 people have browsed it

★跪地哭泣求助:PHP建立SQL临时表后无法访问!?★
事情经过是这样的:

点击某个链接触发某个函数,函数里面做 select * into #temp from A. 并且 select * from #temp

返回结果能显示 #temp 里面的内容。


再次点击某个链接触发某个函数,函数里面只做 select * from #temp.

返回结果不能显示 #temp 里面的内容,经调试,发现数据库里已经不存在 #temp 了。

1、请问为什么会这样呢?#temp 不是会话级别的吗?

2、我改成 ##temp 全局临时表,也和上述 #temp 一样丢失了。

3、如果要把经常查询的结果放到临时表里,等待下次查询的时候减少时间消耗,那应该怎么做呢?

------解决方案--------------------

探讨
如果要把经常查询的结果放到临时表里,等待下次查询的时候减少时间消耗,那应该怎么做呢?
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!