Jump to content
php.lv forumi

Parbuadam, vai tēma pastāv


m8t

Recommended Posts

Tātad, šodien man radās maza problēmiņa. Liku klāt forumu lapai, viss strādāja, bet pašlaik visi var komentēt tur, kur nemaz nav izveidots raksts.

 

Mans pašreizējais kods:

mysql_query("SELECT * FROM {$tblprefix}forums WHERE id='{$_POST['tid']}'"); //$_POST['tid'] = temas id
if(mysql_affected_rows() > 0) {
//kautko te daram
} else {
echo $g4; //error
}

 

Pašlaik es nezinu kas man ir par klūdu. Ja mēģinu ko pievienot tādai tēmai, kura tik itešām arī pastāv un kurai nav neviens komentārs - met laukā error ($g4).

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...