Jump to content

Barchie

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Barchie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for you response, unfortunately it is still only returning one result. I originally tried: $query = "SELECT * FROM departments WHERE 1"; $result = mysql_query($query); $results = mysql_fetch_assoc($result); foreach($results as $result){ echo $result['id'].'<br/>'; } But after realising that i was only getting one id, i started to cut the code back. I added a row to the db and num_rows is returning 3 rows now, but mysql_fetch_assoc is still only returning on result. Ensured query is rigt, ran it in php my admin and received 3 results as expected.
  2. Hey Guys, This might be simple, im not sure... Im having mysql_fetch_assoc (and array for that matter) only returning one row :S The code is as follows: $query = "SELECT * FROM departments WHERE 1"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $result = mysql_fetch_assoc($result); Weird part is $num_rows is returning 2 rows. But mysql_fetch_assoc array only has one entry. I dont get it I have another query further down, exactly the same format that returns the right amount of data. Any ideas? Im lost.
  3. Hehhe... <c> is what he thought <center> was.... my bad...
  4. Hey <c> </c> used to be center in HTML. Every single part of this site is sourced from an SQL database so the <c></c> is just one of my mates who was testing the CMS figured he could center the title of the home page from the SQL entry with <c></c> - Doesnt work due to css attributes... Will attempt to tidy up markup... Any other ideas?
  5. G'day guys, I have been building a website for quite some time now, a little while ago i had everything running smoothley, both in IE and Firefox as well as the others, since then i have made some modifications, specifically added a tree menu that is included into the page. Was just wondering if straight off the batt there are any blatently obvious reasons why something along these lines would fail so miserably. URL: http://www.exectronics.com.au (specifically the products page) I understand usually i should past code / css if needing help, but its really messy... just wondering if anyone had some tips / had same kind of problems that might be able to tell me something obvious that i am yet to stumble upon. (im sure i have made a lot of mistakes... unofficially attempted to teach myself php / sql / css , have probably missed alot.) Anything jump to mind? Thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.