$ _Session HTML表 [英] $_Session HTML table

查看:107
本文介绍了$ _Session HTML表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个sql查询(下面),它应该使用登录页面的登录ID并根据该用户进行查询。我无法弄清楚$ _session的正确格式,似乎在错误消息中打印了正确的用户ID,但查询的其余部分没有提取任何数据。



错误显示:您的SQL语法有错误;检查与您的MySQL服务器版本对应的手册,以便在第1行的'27008 order by Policy asc'附近使用正确的语法



我试过的:



So I have a sql query (below) which is supposed to use the login id from login page and do a query based on that user. I can't figure out the correct formatting for the $_session, seems to print the correct user id in the error message but the rest of the query is not pulling any data.

error showing: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '27008 order by Policy asc' at line 1

What I have tried:

$sql = "select pendingindex.* from pendingindex join sorttest on pendingindex.pendreckey = sorttest.pendreckey where agentid in( select agentid from pinagentid where pin = . {$_SESSION['user_id']} order by $sort $sort_order";

推荐答案

_session,似乎在错误消息中打印了正确的用户ID,但查询的其余部分没有提取任何数据。



错误显示:你的错误SQL语法;检查与MySQL服务器版本对应的手册,以获得正确的语法,在第1行的'27008 order by Policy asc'附近使用



什么我试过了:



_session, seems to print the correct user id in the error message but the rest of the query is not pulling any data.

error showing: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '27008 order by Policy asc' at line 1

What I have tried:


sql =select pendingindex。* from pendingindex加入排序在pendingindex.pendreckey = sorttest.pendreckey上测试agentid in(从pinagentid中选择agentid,其中pin =。 {
sql = "select pendingindex.* from pendingindex join sorttest on pendingindex.pendreckey = sorttest.pendreckey where agentid in( select agentid from pinagentid where pin = . {


_SESSION ['user_id']}订购
_SESSION['user_id']} order by


这篇关于$ _Session HTML表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆