Hi Warzol,
Keep in mind that houdini's reply works, but when you try to retrieve more then one row from a database (Multiple records) you will need to loop through your data. In your first post, you have made a crucial little slip:
You define the query string just fine. You then run the query, that is good too.
But you have forgotten that the resultant of the query is not data, but an index to the database. You need to subsequently retrieve the records from the database, which is what houdini does here;
$row = mysql_fetch_assoc($result);
What I personally like to use:
$query = 'SELECT * FROM ".$compagny." WHERE id=".$_GET['id']."'; // be very carefull.. This is risky with regards to SQL injections
$result = mysql_query($query)
or die(mysql_error()); // Unles you have multiple databases running, you do not need to provide the database handle
if(result) // check that a result was obtained
{
while($row = mysql_fetch_array($result) // As long as there are more records to be had
{
echo $row['compagny'];
}
}