Jump to content
MakeWebGames

Tables... Only returning one entry?


Jake
 Share

Recommended Posts

When I'm making a table which is taking data from my MySQL databases... it is only printing one record... even though there are many in there.

Anyone got an answer? :-(

I believe this may be occurring because within the table i am trying to include data from other SQL tables, as this happened before with forums, when i was trying to include a users level, and post count.

Is this why?

Link to comment
Share on other sites

Re: Tables... Only returning one entry?

when printing a table to display DB data you dont finish off the table tag

I.E. this is from my estate page

 

	<tr><td>[url='estate.php?property={$r[']{$r['hNAME']}[/url] </td><td>$$t".money_formatter($r['hPRICE'],'')."$et </td><td>{$r['hWILL']}</td></tr>";

 

I hope this helps u out some

Link to comment
Share on other sites

Re: Tables... Only returning one entry?

if you get say, all users with a in their name, and join it with, all users who have an item worth more than $70, and 40 people have an a in their name, and two people have $70 items, it'll only return the 2 IDs

eg:

SELECT u.*, a.* FROM users u, items a WHERE u.id = a.ownerID AND a.price > 70 AND u.name LIKE '%a%'

 

would return the 2 people (i think, wrote it quickly)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...