# \[PHP MySQL\] Query Problems

**URL:** <https://forum.kirupa.com/t/php-mysql-query-problems/138911>\
**Category:** Uncategorized\
**Created:** [February 26, 2005, 4:24pm UTC](https://forum.kirupa.com/t/php-mysql-query-problems/138911 "2005-02-26T16:24:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jw06](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jw06](https://forum.kirupa.com/u/jw06)\
**Post date:** [February 26, 2005, 4:24pm UTC](https://forum.kirupa.com/t/php-mysql-query-problems/138911/1 "2005-02-26T16:24:13Z")

</div>

Alright, I am trying to make a script that will automaticly update some URL’s in a table. I’ve used this format of a query in order to get the content before, but this time its only returning the number of entries in the table.

```php

             $query = "SELECT COUNT(*) AS url FROM urls";
	if ($r = mysql_query($query)) {
		while ($row = mysql_fetch_array ($r)) {
			$url = $row['url'];
			echo "$url";
			$gather = new Harvest_Keywords($url);
			$gather->process();
		}
	} else {
		die ('Error: ' . mysql_error() . '');
	}

```

Any ideas on what I’m doing wrong?
