database design

2009-09-11 Thread AndrewJames
This is a bit of a long shot, but i really need some help and or directed to the best reading resources. as i begun building my database (as i went along), i now realise i have to stop coding and sit back and design the database properly before i can go on. However i am still unable to wrap

Re: database design

2009-09-11 Thread AndrewJames
fuller.art...@gmail.com Cc: Claudio Nanni claudio.na...@gmail.com; AndrewJames andrewhu...@gmail.com; mysql mysql@lists.mysql.com Subject: Re: database design A) You would probably want to populate the Article.Article_Type column with Article_Type.ID. You probably wouldn't need Article_Type table

mysql_real_escape_string()

2009-09-07 Thread AndrewJames
Hey guys, whenever i try to perform this function on my $variables before using them in sql queries it deletes them and returns my variable as nothing, ''. this is how i am using it. my login.php form $username = check_input($_POST['username']); $password = check_input($_POST['password']);

a better way, code technique?

2009-09-04 Thread AndrewJames
is there a better way (hopefully simpler) to code this? i want to get the user id of the logged in user to use in my next statement. $q1 = sprintf(SELECT uid FROM users WHERE users.username='$username'); $result1 = mysql_query($q1); $uid = mysql_fetch_array($result1); $u = $uid['uid']; it

Re: AW: Re: a better way, code technique?

2009-09-04 Thread AndrewJames
, code technique? -Ursprüngliche Nachricht- Von: Per Jessen [mailto:p...@computer.org] Gesendet: Freitag, 4. September 2009 13:05 An: mysql@lists.mysql.com Betreff: Re: a better way, code technique? AndrewJames wrote: is there a better way (hopefully simpler) to code this? i want to get

need help with relational tables/fields

2009-09-03 Thread AndrewJames
Hey, i have a table called users which has my users in it, each have a uid field. I also have a stories table which has stories in it each with a sid field for each story but also a uid field so i know which user the story belongs to. i want to write a query that will display the story