Forum Moderators: coopster
There is a string in the MySql DB that contains a single quote when the following code is executed the value for dancer7 returns an empty string even though when I query the database directly it returns "O'Reilly"... Incase you are wondering URL7 has a value that is returned.... don't get me started on why there is only one row in the database with columns named url1..dancer1...url2...dancer2...url(and so on)....dancer(and so on)
<?php include("connection.php");?>
<?php
$res = mysql_query("SELECT * FROM dancers");
$o = mysql_fetch_object($res);
?>
<?php
echo "<a href=\"$o->url1\" class=dancers>$o->dancer1</a><br><br>";
echo "<a href=\"$o->url2\" class=dancers>$o->dancer2</a><br><br>";
echo "<a href=\"$o->url3\" class=dancers>$o->dancer3</a><br><br>";
echo "<a href=\"$o->url4\" class=dancers>$o->dancer4</a><br><br>";
echo "<a href=\"$o->url5\" class=dancers>$o->dancer5</a><br><br>";
echo "<a href=\"$o->url6\" class=dancers>$o->dancer6</a><br><br>";
echo "<a href=\"$o->url7\" class=dancers>$o->dancer7</a><br>";
?>
Any insight would be welcomed.
The table I queried to confirm the value was correct was some dumb view that was joined to a table that had the right info... the form that was inputing to the table I am submitted doesn't have the proper quotes and so the single quote in her name was terminating the field so it was getting inputting to the tables I am submitting it to.
Another bug for this site..... Why did I agree to taking it on?