MySQL数据查询和尖括号的东西 [英] Mysql data query and the sharp-pound underbar thing

查看:85
本文介绍了MySQL数据查询和尖括号的东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个看起来像$query="SELECT * FROM #__content"的mysql查询. 我不知道内容前的#__是什么意思? 如果我创建了类别为Y的商品X,那么如何在Joomla中引用包含X的mysql表?

I have a mysql query that looks like this $query="SELECT * FROM #__content". I have no idea what the #__ before content is supposed to mean ? If I have created an article X of category Y, then how can I refer to the mysql table that contains X in Joomla ?

推荐答案

#__只是数据库表前缀,在您的configuration.php中定义

#__ is simply the database table prefix and is defined in you configuration.php

如果未定义,人们将不得不手动将其前缀输入到每个需要访问数据库的扩展名中,您可以想象这很烦人.

If it wasn't defined, people would have to manually have to input their prefixes into every extension that requires access to the database, which you can imagine would be annoying.

例如,如果您的数据库表前缀为j25,则:

So for example, if you database table prefix is j25, then:

#__content = j25_content

这篇关于MySQL数据查询和尖括号的东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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