Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I need some help...
My second if loop is not working! I must be doing something wrong but i can't figure it out for the life in me. If my second if loop is not within the else clause the 1st if loop works flawlessly... Any help you can provide will be greatly appreciatedCode: Select all
$strsql="select count(id) from vb_table where url like '$direccion_'";
$strsql2="select count(id) from vb_table where url like '$direccion'";
if(mysql_result(mysql_query($strsql,$db),0)==0 && mysql_result(mysql_query($strsql2,$db),0)==0)
{
return respuesta("1","message1");
}
else{
$time_b = "select time_b + 0; from vb_table where url like '$direccion'";
$currenttime = $curtime() + 0;
$waittime = $time_b - $currenttime;
if($currenttime <= $time_b)
{
return respuesta("1","$waittime");
}
else
{
mysql_query("update vb_table set ping=ping+1, time_a=now()+3000, last_update=now() where url like '$direccion%'",$db);
return respuesta("1","message3");
}feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]