Everything seemed to be working fine. I have a table, it alphabetically lists a bunch of cities and relivant city data.
However, I found out that the city is showing up only one time when I have can have more than one rows with that City name.. I.e. - I should have 15 rows that are all "Jacksonville" but I am only seeing one. I guess my code is eliminating what it thinks are duplicates?
Here is my code (I renamed field names for communication purposes)
$dbhandle = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
$selected = mysql_select_db("companies",$dbhandle)
or die("Could not select companies");
$query = mysql_query("SELECT* FROM companies GROUP BY City");
while ($row = @mysql_fetch_array($query))
{
$variable1=$row["Email"];
$variable2=$row["WEB"];
echo "<tr bgcolor="#dddddd"><td><center>";
echo $row["City"];
echo ($variable2 != '') ? "<a href="$variable2"></br> Website</a>" : '';
echo ($variable1 != '') ? "<a href="mailto:$variable1">Email</a>" : '';
echo ltrim($row[""], '0');
}?>
PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) about using AJAX and a database. It's my first time actually using AJAX and I've run into a problem.
$variable = $variable
HelloSorry if this is a really simple question but I have run out of ideas. Is there a really simple way of doing the following:$animal_dog = $something_something[$i]['animal_dog'];$animal_cat =
cyrillic string conversion question
Hello,
Logging and nologging bulk insert
Hi,
What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is going wrong. It's a set of filters for events. The filter marked "type" (category) works
using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the button and it puts the name into the database and into a list on my page. it works fine. Now, I wanted to
File upload issues
Hi Guys,Can anyone see any issues with this code:Code: [Select]$setImage= 'productimages/' . date(U) . $HTTP_POST_FILES['setImage']['name'][0];copy($HTTP_POST_FILES['setImage']['tmp_name'][0],
Company Code for Vendors created through Business Partners
Hi, experts!
Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email", "projectmanagment" now each of these "apps" need a mysql table, each of these
Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it has to do with the several while loops that should be outputting the data. One more issue is that