Jump to content

Mamo

Members
  • Posts

    27
  • Joined

  • Last visited

Mamo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. no thing changed... i even wrote an echo statement after the while loop, and it skipped the while loop and echo out what i wrote.
  2. Hi, I have a problem with this code and that is it wouldn't perform the while loop block of code. <?php if(mysql_connect('localhost', 'root', 'mamo12121') && mysql_select_db("mamo") ) { $word = $_POST['word']; $project = mysql_query("SELECT * FROM project WHERE title LIKE '%+ $word +%'") or die('ooops'); while ($pro = mysql_fetch_assoc($project)) { $protit = $pro['title']; $proque = $pro['question']; echo $protit . '<br >' .$proque; } ?>
  3. i even tried to use an UPDATE statement instead of INSERT...like this $choose = "UPDATE answer SET answer-ch = '$answ' WHERE title-a = '$release' ";
  4. I am having another problem.... i have two tables.....table '1' and table '2' , in table '1' i made a "title" column and indexed it as UNIQUE, and in table '2' i made a "title-a" column which is foreign key to the "title" column in the other table and "answer" column, the two of the columns ("title-a" + "answer") forms the primary key for this table. Now, what i need is to INSERT values to the "answer" column WHERE the "title-a" column satisfies a specific condition. Thank you for reading this.
  5. thanks a lot, i understand now.
  6. I am sorry, but i didn't quite understand you.
  7. okay when i insert a new value to the primary key column , do i have to insert it to the foreign key to or it will be inserted automatically.
  8. hi i have a problem and that is i created a MYSQL table with a foreign key column referencing to a primary key column in another table that i have already inserted a values in it earlier. Now what i want to do is to insert all of the primary key's column values into the foreign key column . thank you for reading this.
  9. can i use variables with the values assigned to them from page (A) in page (B).
  10. if (mysql_connect('localhost', 'root', 'mamo12121') && mysql_select_db("project")){ $select = mysql_query("SELECT title, time, question FROM ask ORDER BY time"); if (mysql_num_rows($select) == 0) { echo "No Entries Has been found"; } else { while ($entries = mysql_fetch_assoc($select)) { $entries_time = date('D:M:Y @h:i:s', $entries['time']); $entries_title = $entries['title']; echo '<br >' . $entries_time . '&nbsp&nbsp&nbsp&nbsp' . ?> <a href="ask_3.php"> <?php $entries_title ?> </a ><?php . '<br >'; } } } else { echo "Something went worng"; } the browser tells me that there a parse error
  11. Mamo

    Ask question

    Thank you, i understood that, but i need other users on the website to be able to answer the question that i saved . Like the concept of "phpfreaks" website.
×
×
  • 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.