mysql_fetch_array()问题

问题描述:

晚上好 -


提前感谢您的帮助!


附加的是我的查询和html表格布局。


我正在尝试在一个select语句中查询3个tbles,并将数据返回到html表。


之前我将它分解为三个选择语句和三个结果。

Good evening -

thanks in advance for you help!

attached is my query, and html table layout.

I''m trying to query 3 tbles in one select statement, and return the data to html table.

it work before when i had it broken down into three select statements and three results.

展开 | 选择 | Wrap | 行号

嗨。


什么都没有基本上错误与查询。它看起来非常有效。


您的连接语法可能不合适。我不知道你不知道你的桌子结构。


我建议你通读 12.2.8.1。参考手册中的JOIN语法

它解释了您可以使用的各种类型的连接。也许你需要使用不同的类型。
Hi.

There is nothing essentially wrong with the query. It looks perfectly valid.

Your join syntax may be off tho. I can''t really tell without knowing your table structures.

I suggest you read through 12.2.8.1. JOIN syntax in the reference manual.
It explains the various types of joins you can use. Perhaps you need to be using a different type.


好的,谢谢你会看看tbl连接。


这里是表结构。

ok thanks will look into the tbl joins.

here is the table structure.

展开 | 选择 | Wrap | 行号


this是我放置回声时得到的错误。错误


codeError:重复条目''22''用于键''PRIMARY''

i在sqlplus中运行查询并返回22记录。


当我为每张桌子使用一个选择时,这个工作正常。既然我加入了他们并希望在html表中布局数据就会出错。
this is the error that i get when i placed the echo . error

codeError: Duplicate entry ''22'' for key ''PRIMARY''

i run a query in sqlplus and it returns 22 records.

this worked fine when i used a single select for each table. now that i joined them and want to layout the data in html table it errors.