Note that there are some explanatory texts on larger screens.

plurals
  1. POmysql_fetch_array() expects parameter 1 to be resource, boolean given in
    primarykey
    data
    text
    <p>I am not the first guy who is asking this question here but seriously, I tried possible duplicates before asking.</p> <p>Here is my code: Updated </p> <pre><code> foreach ($pieces as $v) { $get_user ="SELECT * from demo_user WHERE user_name ='$v'"; $result = mysql_query($get_user); if (!$result) { die(mysql_error()); } while($row = mysql_fetch_array($result)) { $GLOBAL_REST_URL = "http://192.168.0.100:9000/meeting/"; $part_name = $row['user_name']; $participant = array("email"=&gt;$row['primary_email'], "contact_no"=&gt;$row['primary_mobile'], "password"=&gt;$attendee_password, ); $LOCAL_REST_URL = $GLOBAL_REST_URL .$mtngid.'/participant/'.$row['user_name'] ; $json_part = array2json($participant); $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,$LOCAL_REST_URL); curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,20); curl_setopt($curl_handle, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($curl_handle, CURLOPT_POSTFIELDS,$json_part); curl_setopt($curl_handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1); $buffer = curl_exec($curl_handle); curl_close($curl_handle); $getit_part = json_decode($buffer, true); if ($getit_part['code'] == 200){ $key = $getit_part['data']; $join_url = "http://192.168.0.100/UI/user/joinuser.php?meetingid=".$mtngid."&amp;key=".$getit_part['data']; $pr_mobile = $row['primary_mobile']; $pr_email = $row['primary_email']; $sql = "INSERT INTO demo_participant(name, meeting_id_id, password, user_view__url, `key`, contact_no, email) SELECT '$part_name', id, '$attendee_password', '$join_url', {$getit_part['data']}, '$pr_mobile', '$pr_email' FROM demo_meeting WHERE meetingID = '$mtngid'"; $result = mysql_query($sql) or die (mysql_error()); } // $message = 'Hi '.$_GET['meeting_name'].',and associated participant Updated successfully '; } } </code></pre> <p>When I execute the above code, I get the following warning:</p> <pre><code>mysql_fetch_array() expects parameter 1 to be resource, boolean given in </code></pre> <p><code>print_r($pieces)</code> outputs:</p> <pre><code>Array ( [0] =&gt; Digvijay [1] =&gt; philip [2] =&gt; fake ) </code></pre> <p>Please let me know, what I might be doing wrong.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload