O'Reilly Forums: Why Use $topicids=array(). Page448. Chapter 8. - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Why Use $topicids=array(). Page448. Chapter 8.

#1 User is offline   DGiraldo 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 16-November 13

Posted 06 February 2014 - 07:53 AM

I don't understand why it is necessary to use $topicIDs = array() on page 448.

There is a query :

 'INSERT INTO mismatch_response (user_id, topic_id) VALUES ('" . $_SESSION['user_id']. "', '$topic_id')";


couldn't we just avoid using the $topicIDs array and just say:

 "INSERT INTO mismatch_response (user_id, topic_id) VALUES ('" . $_SESSION['user_id']. "', $row[''topic_id'])";



I am sorry if this is a stupid question, but I am a newbie who feels really confused by this.

Your help is greatly appreciated.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users