Well, first off, the column names do matter, in as much as they can be case sensitive (not so on a Windows platform, usually, but on linux for sure) so referencing the column `name` and `Name` would be two different things.
Secondly, your query would fail because you haven't used quotes around the string you want to compare. In other words, you're looking for any records that have a `name` column where the value is 'John'. Because you've left the quotes out, the queries you've written are literally looking to compare a column `name` with a column `John` (which I'm assuming doesn't exist, so the query returns no result; in fact it should fail).
Third, your calls to mysql_result() reference columns that you haven't named in your query at all, specifically image_url (myimage) and link_url (myurl), and use a seemingly nonexistant variable $i for the row. These values need to be the actual value of columns you've referenced in the SELECT statement. Furthermore,
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --