FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Need help with a Database issue.





[FuN]goku
MMkay so i got this sql file that has most of the world of warcraft items and i need to know something. But first here is the sql.
Code:

CREATE TABLE `item_cache` (
  `item_name` varchar(100) NOT NULL default '',
  `item_link` varchar(100) default NULL,
  `item_color` varchar(20) NOT NULL default '',
  `item_icon` varchar(50) NOT NULL default '',
  `item_html` text NOT NULL,
  UNIQUE KEY `name` (`item_name`),
  FULLTEXT KEY `data` (`item_html`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


I need to call every value from item_name on 1 page, and have them in nice neat tables. soo uhm how would i go about doing that?
jeromep
My suggestion to you is to look for the solution instead of asking for the solution. I am certain that there are already a hundred answers that will suffice your question below.

If you don't do that, then try this on PHP. Just supply your MySQL hostname, user, password, and database in this code.

Code:

<html>
<body>
<table>
<tr><th>Item Name</th></tr>
<?
$yourHost="";
$yourUser="";
$yourPassword="";
$yourDatabase=""
mysql_connect($yourHost,$yourUser,$yourPassword);
@mysql_select_db($yourDatabase);
$result=mysql_query("SELECT item_name FROM item_cache") or die("Error"); ;
$num=mysql_numrows($result);
$i=0;
while ($i < $num) { ?>
<tr><td><? echo mysql_result($result,$i,'item_name') ?></td></tr>
<?
$i++;
}
mysql_close();
?>
</table>
</body>
</html>
[FuN]goku
ahhh thank you alot! but would you have any idea how to make a separate page for each and on that page display
Code:
item_html
on that page for each item? and make a hyperlink to each item on the itemlist.
Related topics
How Spyware Works!!!
Navigation Script (javascript) Help Please!
Need help with database, can anyone help?
No CPanel Access
Need Database help!!! Will pay!
G3 and Tiger Raid issue, Help
How do I debug my site, How to turn log_errors on
HELP ME PLZ ! DATABASE ERRORS !
Error connecting to mysql ; please help
Help with Socket Database
I need help with YouTube!!
anti-ISLAM movie WTF? (a neutral post)
.htaccess file and 404 error
Dell Cheated me
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.