Jump to content

rallokkcaz

Members
  • Posts

    194
  • Joined

  • Last visited

    Never

About rallokkcaz

  • Birthday 08/25/1993

Profile Information

  • Gender
    Male
  • Location
    Somewhere, CA (Cactus Area)

rallokkcaz's Achievements

Member

Member (2/5)

0

Reputation

  1. You'd have too make it so in the database there's a field that indicates if the user is online or not. It would be like: online = true when they sign in, and online = false when they sign out or the session expires. That's the only way todo it because sessions are local. Well there are other ways, but this is the most practical. -Zack
  2. Okay guys, mysql_num_rows() is acting really strange, when ever i call it in my loop, it doesn't allow me to display other records that i need to come up. For instance I'm checking to see if a category has a subcategory but it isn't showing the categories that don't have subcategories. Here's the code: $sub_cats = mysql_query("SELECT * FROM `categories` WHERE sub = '". $result['name'] ."'"); while($row = mysql_fetch_array($sub_cats)) { $query = mysql_query("SELECT * FROM `categories` WHERE sub = '". $row['name'] ."'"); $rows_count = mysql_num_rows($query) or die(mysql_error()); if($rows_count > 0) { echo "<div class=\"category\" onclick=\"getCategories('". $row['name'] ."'); return false;\">". $rows_count ." ". UCWords($row['name']) ."</div>"; } else { //Just to check if it would even show the rows without sub-categories. echo "DSAKFKASDSA"; } } Anyone have any idea's why this is happening, or is this just some dumb mistake i'm making because it's been awhile since i've used PHP. -Zack
  3. Is it possible to do something like "mysite.com/user:1". I've tried stuff like: RewriteEngine on RewriteRule ^user:([0-9]+)$ profile.php?id=$1 [L] But it doesn't work, any ideas on what i'm doing wrong, or solutions other than the one i'm doing.
  4. foreign key anyone!?!?!?!?!? ????????
  5. you would probly have to set some variable that makes it so the user can only post 2 posts every minute or somthing like that im not sure how it would look in code but i might work
  6. so how exactly would the foreign key be coded into mysql??
  7. no thats for my news table so how exactly would i use a foreign key?
  8. k its got id user content topic time
  9. yup, i had the LIMIT part in the wrong place and got it too work. and can someone answer my question?
  10. i had to go man it was 2 am and i had school sorry
  11. i currently have a news system, and want to allow people to add comments on what they think about the article. would i have to add another table, or another row into my database. any help? Thanks
  12. so how would i make it show it shows links on the bottom and top of the page for pages?
  13. it means that your missing { } 's
×
×
  • 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.