cerealtx
February 19th, 2009, 06:01 AM
Okay, i have working code, that gets information from a webpage, but then im going to do stuff with that information, but i don't want to duplicate it, how can i check my mySQL database for a entry am i going to have to go through the entire table each time? because after each user thats not on it, im going to do the "stuff" to the information then add that info to the database so its not repeated, could i just search for that information in the database? like
$result = mysql_query("SELECT Name FROM table WHERE Name='info'");
while($row = mysql_fetch_array($result))
{
if(!result)
{
echo "not found..."
do whatever...
}
but see like that, its going to have to go through the entire database, while it wont take long it still seems like a waste
$result = mysql_query("SELECT Name FROM table WHERE Name='info'");
while($row = mysql_fetch_array($result))
{
if(!result)
{
echo "not found..."
do whatever...
}
but see like that, its going to have to go through the entire database, while it wont take long it still seems like a waste