Jump to content

help regarding MySQL query ...


dearmoawiz

Recommended Posts

hi guys

 

  here is the scenario ..

  in the categories description table category_id is primary key .. so when this query executed it return just one row... now i want to display the name of category without loop so wat will b the next statment which show me the name of category ... 

  waiting for response...

 

$q = "select categories_name from categories_description where categories_id = 1";

$result = mysql_query($q);

 

?

?

?

  thnxxx

Link to comment
Share on other sites

thnx for ur response buddy but it dosent work it just display the blank screen .. now dont say that it may b possible in database no result match wid following criteria .. bcoz there is one field which have the ID = 1 n its name is hardware .. so it must display the result hardware but nothing happened like tht ..

            waiting for response from any other body ..

Link to comment
Share on other sites

what if obtain the result by loop?

check out man;) ;)

<?

$con=mysql_connect("localhost","root","");

mysql_select_db("mp3web",$con);

//$q=mysql_query("SELECT * FROM tbl_subscribe WHERE sbc_Email='lovw@love.com'");

$sql6 = "SELECT * from  tbl_subscribe  where sbc_Email='love@love.com'";

$result2=mysql_query($sql6);

while($row = mysql_fetch_assoc($result2))

{

extract($row);

//global $crsymbol;

echo $sbc_Name;

}

 

?>

with love

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.