Page 1 of 1

arrays Windows v.s Linux

Posted: Fri Apr 14, 2017 11:45 am
by georgeT
It worked fine on windows but I need to run it under Linux and it just does not want to budge! Would anyone would have any idea what might be going on? Or, what would be conflicting between the two OSs. Thanks much. :help:

Code: Select all

	$result = mysql_query("SELECT location,comments,locid FROM $locationdb
			WHERE userid = '$userid'");
				echo"query failed_ ";
		return $unprocessed;

		while($draw = mysql_fetch_array($result)){
			$nlocs[$j]= $draw['location'];
			$nlocloc[$j]= $draw['comments'];
			$nlocid[$j]= $draw['locid'];
			$locArray[$nlocid[$j]] = $nlocloc[$j]." ~ ".$nlocs[$j];		// is this correct???
		return $locArray;

This is the output I am trying to get:
// location, comment, id
// location = street xyz // comment = 9am, friday // id = user (multiple locations just this one user)
<option> street xyz, 9am, friday </option>
<option> street abc, 2pm, thursday </option>
<option> street opl, 12noon, friday </option>

Re: arrays Windows v.s Linux

Posted: Sat Apr 15, 2017 9:43 am
by NigelRen
You might find that the mysql functions have been removed ( deprecated since PHP 5.5 ) so it would probably need to be updated anyway to either MySQLi or PDO.

Re: arrays Windows v.s Linux

Posted: Sun Apr 16, 2017 8:34 am
by georgeT
My PHP version is 5.3.3! Nigel, you talk about v5.5, is everybody up to date, what about the providers, if you want to setup a web site!? It seems like some of the stuff is moving too fast forcing unnecessary changes to existing apps. You know the saying; "the old worked and was reliable, the new is new, unreliable and does not last!"
I just need to figure out the workings around.