Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
anyone got an idea how to complete the following while loop. I want to set a database column (LT_URL) to a sting ($ltURLarray[i]),
but 1st i want to check if it already exist in the db, if it does exist, then I want to test the next sting exist in the db, if it doesnt set LT_URL to $ltURLarray[i] on the i'th attempt.Code: Select all
$ltURLarray[0] = 'string0';
$ltURLarray[1] = 'string1'; //.......
$ltURLarray[100] = 'string100';
// some how put the follwing in a while loop while i<100:
i = 0;
URLdata = mysql_query("SELECT LT_URL FROM lt_Users WHERE LT_URL = '$ltURLarray[i]' LIMIT 1")or die(mysql_error());
if (!mysql_num_rows($URLdata)){
$ltURL =$ltURLa[0];
}feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]