Jump to content

fail experiment (mysql fetch array...)


BluwAngel

Recommended Posts

Warning: mysql_fetch_array() expects parameter 1 to be resource, string given...

 

 

im tryin to put class inside code if $dayNumber and $dan are equal

 

i tried few ways but all are complicated since i have to call some functions this end up as "simple" solution but i dont know where did i get wrong PS that should be possible?

 

else {
                  echo "<td width='40'";
			  $moj_id = $_SESSION['id'];
			  $query_event = mysql_query("SELECT * FROM events WHERE id_user='$moj_id' GROUP BY 'event_date'") ;
			  $test = mysql_fetch_array('$query_event');
			  $date_event = $test['event_date'];
			  sscanf($date_event, "%d-%d-%d", $godina, $mjesec, $dan);
			  if ($dan==$dayNumber && $mjesec==$month && godina==$year)
			  {

				  echo " class='radni'";
			  }
			  
			  
			  echo"><a href='day_info.php?dan=",$dayNumber,"&mj=",$month,"&gd=",$year,"'>" . $dayNumber . " </a></td>\n";
                  $dayNumber++;                           
              }

Link to comment
https://forums.phpfreaks.com/topic/258494-fail-experiment-mysql-fetch-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.