Search found 4 matches

by astralkid
Sun Feb 19, 2012 12:58 pm
Forum: PHP
Topic: still stuck on joins for blog system :(
Replies: 6
Views: 1669

Re: still stuck on joins for blog system :(

libeco wrote:Why don't you use foreign key constraints? http://dev.mysql.com/doc/refman/5.5/en/ ... aints.html
That's what i did end up using.. I got it working.. can close this please thanks :)
by astralkid
Sun Feb 19, 2012 1:26 am
Forum: PHP
Topic: still stuck on joins for blog system :(
Replies: 6
Views: 1669

Re: still stuck on joins for blog system :(

SOLV ED
by astralkid
Sat Feb 18, 2012 1:40 am
Forum: PHP
Topic: still stuck on joins for blog system :(
Replies: 6
Views: 1669

Re: still stuck on joins for blog system :(

The cat_id is set whenever I click delete from the cat_list page...

i've tried...
WHERE cat_id = $cat_id
WHERE cat_id = $_GET['cat_id']
...etc, but none seem to work.. do I need to do a FOREIGN KEY or a INNER JOIN on c.id to p.cat_id ??
by astralkid
Thu Feb 16, 2012 11:28 pm
Forum: PHP
Topic: still stuck on joins for blog system :(
Replies: 6
Views: 1669

still stuck on joins for blog system :(

I'm having troubles with my blog... I have 2 tables: 1. posts(id, cat_id, title, contents, date_posted) 2. categories(id, name), and to delete the category: <a href="delete_category.php?id=<?php echo $category['id']; ?>">Delete</a> if i view the categories and try to delete one from my cat...