Jump to content

help with this :|


corillo181

Recommended Posts

i asked for help before but i still got nothing..

this is inside a loop..

nd it suposed to count how many is inside of what ever the id is

[code]

$myquery=mysql_query("select count(*) from comment WHERE p_id='".$onep['p_id']."'")or die(mysql_error());
while($times=mysql_fetch_array($myquery)){
$rows=mysql_num_rows($times);
echo $rows;
}


[/code]

i think the code is self explanatory.. i'm trying to count how many things are in side the table with the same id as the variable id..
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.