mysql 和 php 视图
我正在编写一个 html 表单,它只是将数据传递到 php 表单,然后传递到 sql 数据库。 我的问题是,视图应该存储在 php 还是 sql 中(并从 php 调用它们)? 我可以做到。问题是在我看来我有变量。即每次我打电话给他们时我都有不同的参数。
所以我的php代码看起来像这样:
$this->query = "SELECT student.gender FROM student WHERE email ='$this->email'";
如果我将上面的视图放入mysql中,我就不能使用像“email”这样的变量,对吧?
那么视图最好存储在哪里呢? 程序也一样吗?
i am writing a html form, that simply passes data to a php one, and then to an sql database.
my question is, should view be stored in php or sql (and call them from php)?
i could do that. the problem is that in my views i have variables. i.e each time i call them i have different parameters in them.
so my php code looks like this:
$this->query = "SELECT student.gender FROM student WHERE email ='$this->email'";
if i put the above view in mysql, i can't use a variable like "email" right?
so where are view better to be stored?
same goes for procedures ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)