More Problems

Support, Snippets & Projects

Moderators: Moderator, Global Moderator

Post Reply
Trinity
Hero Member
Hero Member
Posts: 808
Joined: Wed May 05, 2004 2:19 am

More Problems

Post by Trinity »

More troubles, this code here works:

Code: Select all

function addTutCat($title, $desc) {
 	 $sql = "INSERT INTO tutorial_cat (`name`,`desc`) VALUES ('".$title."','".$desc."')";
 	 $result = $this->_dbCon->doQuery($sql);
 	 if ($result != true) {
    echo $result;
 	 }
 	 $this->showAdminRoot();
  }
This code doesn't:

Code: Select all

function submitTut($title, $desc, $cat, $uID, $author, $tutorial) {
 	 $sql = "INSERT INTO tutorials (`name, `desc`, `cat`, `userid`, `author`, `tutorial, `active`)".
   	 "VALUES ('".$title."', '".$desc."', '".$cat."', '".$uID."', '".$author."', '".$tutorial."',  '0')";
 	 $result = $this->_dbCon->doQuery($sql); 
 	 if ($result != true) {
    echo $result;
 	 }
 	 $this->showCat($cat);
  }
I don't get any errors, it just goes straight to the showCat function without changing the database at all /cry.gif' class='bbc_emoticon' alt=':(' />
Last edited by Trinity on Tue Dec 21, 2004 11:59 pm, edited 1 time in total.
Scott
Administrator
Administrator
Posts: 1651
Joined: Sun Apr 25, 2004 6:08 am

More Problems

Post by Scott »

If its showing the cats then the code is right, must be db problem of some sort.
Post Reply

Return to “PHP & MySQL”