MySQL Forums
Forum List  »  PHP

To Much Data I Need To Control It. How Can I?
Posted by: Rob Puck
Date: October 16, 2007 06:46AM

If you go to this website and create a test item, it will redirect you. Then it will display the following tables entry Itemsname dispalyID of the item you created,

this is every thing i want it to do. but im having a problem. theres to much data in the items table. and the page loads to slowly

What i want it to do is only give the data the person just place in the items table in mysql.

heres the code im using what can i do to change it to only get the data the person just placed?

// Get all the data from the "items" table<<<<<<<<<<<<<<<<<<<<<<here is not what i want to do. I only want the last entry itemsname displayID showen.>>>>>>>>>>>>>>>>>>>>>>>

$result = mysql_query("SELECT * FROM items ORDER BY entry")
or die(mysql_error());

I dont want all the data.i want only the last input info. form the user. what do i do?

echo "<table border='1'>";
echo "<tr> <th style=\"color:white\">ENTRY</th> <th style=\"color:white\">ITEMS NAME</th> <th style=\"color:white\">DISPLAYID</th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td style=\"color:white\">";
echo $row['entry'];
echo "</td><td style=\"color:white\">";
echo $row['name'];
echo "</td><td style=\"color:white\">";
echo $row['displayid'];
echo "</td></tr>";

Options: ReplyQuote

Written By
To Much Data I Need To Control It. How Can I?
October 16, 2007 06:46AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.