# Parameter Problem

**URL:** <https://www.phphelp.com/t/parameter-problem/21439>\
**Category:** Code Snippets\
**Created:** [November 4, 2013, 5:16am UTC](https://www.phphelp.com/t/parameter-problem/21439 "2013-11-04T05:16:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tqmd1](https://www.phphelp.com/letter_avatar_proxy/v4/letter/t/8c91f0/32.png) [@tqmd1](https://www.phphelp.com/u/tqmd1)\
**Post date:** [November 4, 2013, 5:16am UTC](https://www.phphelp.com/t/parameter-problem/21439/1 "2013-11-04T05:16:19Z")

</div>

Dear Sir,

I have following codes

`<?php
mysql_connect("localhost", "root", "") or die("Connection failed! " . mysql_error());
mysql_select_db("asia");
echo "Connection successful!";
$find_query = "select *FROM ghee where sno=3";
$strSQL = mysql_query($find_query);
// Execute the query (the recordset $rs contains the result)
	$rs = mysql_query($strSQL);	
	// Loop the recordset $rs
	// Each row will be made into an array ($row) using mysql_fetch_array
	while($row = mysql_fetch_array($rs)) {
	   // Write the value of the column FirstName (which is now in the array $row)
	  echo $row['pack'] . "<br />";
	  }
mysql_close();
?>
`

It show error message show in attachment

( ! ) Warning: mysql\_query() expects parameter 1 to be string, resource given in C:\wamp\www\find.php on line 8  
Call Stack

# Time Memory Function Location

1 0.0780 141360 {main}( ) ..\find.php:0  
2 0.4836 149584 mysql\_query ( )  
..\find.php:8

( ! ) Warning: mysql\_fetch\_array() expects parameter 1 to be resource, null given in C:\wamp\www\find.php on line 11  
Call Stack

# Time Memory Function Location

My table structure can be seen in attachment

Please help me to get rid of both error messages

* * *

 ![Untitled.jpg](https://www.phphelp.com/uploads/default/original/2X/5/5c425d441a39b9aee407ff957e02af763c68300e.jpg)

---

<div class="post-metadata">

**Author:** ![JimL](https://www.phphelp.com/user_avatar/www.phphelp.com/jiml/32/1842_2.png) [@JimL](https://www.phphelp.com/u/JimL)\
**Post date:** [November 4, 2013, 6:01am UTC](https://www.phphelp.com/t/parameter-problem/21439/2 "2013-11-04T06:01:39Z")

</div>

Both error messages are because you’re doing the mysql\_query line twice.
