Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Double Arrow - MySQL statement with 'not equal to'

Status
Not open for further replies.

mrsbean

Technical User
Jul 14, 2004
203
US
I get the following error from the PHP page I'm trying to change:

Parse error: parse error, unexpected T_DOUBLE_ARROW in .../SomePath.../phTransaction/updatePhTransaction.php on line 238

Here is the code:
Code:
LINE 235:  <? $SQL = "Select * from phTransaction where TransMLS like '%$thisRelated1' and TransMLS <> '$thisTransMLS'";
LINE 236:   $result = MYSQL_QUERY($SQL);
LINE 237:   $numberOfRows = MYSQL_NUM_ROWS($result);
LINE 238:   If ($numberOfRows =>0) 
   {$i=0;
	while ($i<$numberOfRows)
	{$thisTransMLS = MYSQL_RESULT($result,$i,"TransMLS");
	 echo "<p>".$thisTransMLS."</p>";
	 		$i++;

	} // end while loop
	}

I think it doesn't like the <> in my SQL statement, but I don't know what to do differently. As always, all help is much appreciated.

MrsBean
 
It this line:
Code:
LINE 238:   If ($numberOfRows =>0)
Try:
Code:
LINE 238:   If ($numberOfRows[red]>= [/red]0)





----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
i always remember the order as

greater than OR equal to thus >=
less than OR equal to thus <=

a long time ago I remember hunting for ages for the right symbol on my keyboard - the one with a second line under the bottom of the horizontal caret. Almost as stupid as one of the (adult - elderly) students I used to have putting white-out on a screen to delete a word (this is not apocryphal - it really did happen but was in the days of non-wysisig editors!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top