php making query from mysql database getting error like Unknown column in 'where clause' -


i have piece of code in php make query mysql database

if(isset($_session["esb2b_userid"])){      $check_row = mysql_num_rows(mysql_query("select * esb2b_basket es_session='.$site.' , es_uid=".$_session["esb2b_userid"]) or die(mysql_error()));       echo "logged in <b>" . $_session["esb2b_username"] . "</b>" ;     ?> <?   }else{     ?>  <? echo "$to" ?> our website <? } ?> <? if($_session['esb2b_userid']=='')             {?> <span id="log-info"><a href="<?=$domain_url?>/signup.html"><? echo "$join_free" ?></a><?php }?> |       <? if($_session['esb2b_userid']=='')             {?> <a href="<?=$domain_url?>/signin.php?file="><? echo "$sign_in" ?></a><?php } else { ?><a href="<?=$domain_url?>/logout.php" > <? echo "$sign_out" ?> </a><?php }?> 

but here getting error this

unknown column 'esb2b_userid' in 'where clause' 

so can kindly tell me whay getting result , how can solve issue? , suggestions appreciable. thanks

change this

mysql_query("select * esb2b_basket es_session='.$site.' , es_uid=".$_session["esb2b_userid"]) 

to

mysql_query("select * esb2b_basket es_session='".$site."' , es_uid=".$_session["esb2b_userid"]) 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -