So i have this in my database:
INSERT INTO `strange` (`id`, `myKey1`, `myValue1`, `myKey2`, `myValue2`) VALUES
(1, 'sometext', 'somevalue', 'sometext', 'somevalue'),
(2, 'movie1', 'description1', 'movie2', 'description2');
with this code:
<?php
//error_reporting(0);
include "inclusions/entete.php";
$theID = $_GET['id'];
$filename = "fonctions-javascript/uploads/" . $theID. ".html";
//unlink($filename);
$query = "SELECT * FROM strange WHERE id = '$theID'";
$result = mysql_query( $query ) or die ( mysql_error() );
$row = mysql_fetch_array( $result );
$contents = array($row['myKey1'] => $row['myValue1'], $row['myKey2'] => $row['myValue2']);
//$contents = array('one' => "something", 'two' => "something");
print_r ($contents);
//print_r($row);
?>
...the print_r for id 1 is: Array ( [sometext] => somevalue )
but with id 2 the output is: Array ( [movie1] => description1 [movie2] => description2 )
So can somebody please tell me what is going on and what i must be doing to get the all the data with id 1