>You're trying to assign to a function, seriousley messed up. I reccomend you make sure you know PHP before going any >further.

Leif,
   Let's try and be a little more constructive.....

Jason,
mysql_query is a function, so you need to "call" it, not "assign to it". For example.....
(is this a little of Java crap mixed in here? VB?)


mysql_query("Select * from mytable");

so, change your code to the following (making a variable $query)...

$query = "Select ";

Now, I'm not sure where you are getting the mysql_fetch_array($sql_uc, MYSQL_ASSOC) from, but there are a few problems here.
First, it;s most likely that you dont have a result-set to fetch an array from. Also, you forgot the trailing ")" in the while statement.


      while ($result = mysql_fetch_array($sql_uc, MYSQL_ASSOC) )
      {

$query .= " {$result['field_name']} as {$result['display']} ";

      }
          $query .= " from $season";

mysql_query($query);

I suggest you do a google search for "php mysql_query"



Leif K-Brooks wrote:

Jason Martyn wrote:

Here's kinda what I'm trying to do (not working of course).

[snip unimportant code]

mysql_query = ("select");
while ($result = mysql_fetch_array($sql_uc, MYSQL_ASSOC)
{
mysql_query .= (" ". $season .".".$result['field_name']." as ".$result['display'].",";
}
mysql_query .= ("from ".$season.";");


You're trying to assign to a function, seriousley messed up. I reccomend you make sure you know PHP before going any further.




-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to