score:2

Accepted answer

I'm going with the assumption your code above is correct, the way you typed it in production. Then the issue probably lies with your sql query (assumption is that name is from table1 and value is from table2)

SELECT name, value FROM table1, table2

In the above instance, you are not joining them at all. Ideally, when you're outputting two tables, you are joining them at some point:

e.g.

SELECT name , value FROM table1 , table2 WHERE table1.col1 = table2.col2

More Query from same tag