# mysql\_fetch\_array() error

**URL:** <https://forum.kirupa.com/t/mysql-fetch-array-error/276757>\
**Category:** Uncategorized\
**Created:** [December 3, 2008, 11:06am UTC](https://forum.kirupa.com/t/mysql-fetch-array-error/276757 "2008-12-03T11:06:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![creativeFuzion](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/creativefuzion/32/1385_2.png) [@creativeFuzion](https://forum.kirupa.com/u/creativeFuzion)\
**Post date:** [December 3, 2008, 11:06am UTC](https://forum.kirupa.com/t/mysql-fetch-array-error/276757/1 "2008-12-03T11:06:41Z")

</div>

I get the following error out of nowhere:

```auto
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home4/fadedele/public_html/portfolio/index.php on line 61

```

Here is my PHP:

```php
<?
			$db_conn_fev2->connect_to_db("fadedele_fev2");

			$compsDir = "../required/img/portfolio/comps/";
			$croppedDir = "../required/img/portfolio/cropped/";
			$defaultExt = ".jpg";
			$hoverExt = "_hover.jpg";
			$previewExt = "_preview.jpg";

			$projectInfo = mysql_query("SELECT * FROM `projects` ORDER BY `projectID` DESC");

			$i = 0;

			/*LINE 61*/while (($row = mysql_fetch_array($projectInfo)) && $i <= count($row))
			{
    			$i++;
    			$clientID = $row['clientID'];
    			$projectID = $row['projectID'];
    			$title = $row['title'];
    			$description = $row['description'];
    			$cat = $row['cat'];
    			$start = $row['start'];
    			$pic = $row['pic'];

    			$compsItem = $compsDir . $pic . $defaultExt;
    			$compsItemPreview = $compsDir . $pic . $previewExt;
    			$croppedItem = $croppedDir . $pic . $defaultExt;
    			$croppedItemHover = $croppedDir . $pic . $hoverExt;

    			$totalProjects = count($row);
			?>

```

I really do not remember changing anything here. It could be a problem in my DB or include files, but I need to know if this looks good to anyone reading this.
