complaintsaboutgreendiyenergy
New Member
So, i'm creating a money management system. My database has 2 tables: main(id,timestamp,value1,value2) and fields(value1,value2).Value1 and value2 are the categories in which the money are spent. In fact, the script display a table where the rows are the days and the columns are the fields where the money have been spent into (sport, work, girlfriend, etc).Now, i have a problem. The main query is this: \[code\]SELECT * FROM main WHERE FROM_UNIXTIME(timestamp, '%M %Y') = '$date' ORDER BY timestamp ASC\[/code\]as you see, i extract data only from the main table. So if i wanna list all the categories contents i have to write manually the category name for each one of them, like this:\[code\]echo "<td>".$row['value'] ."