This is a discussion on mysql_fetch_array within the PHP General forums, part of the PHP Programming Forums category; Have a problem that is driving me nuts. I have a simple script for viewing all the information in a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Have a problem that is driving me nuts. I have a simple script for viewing
all the information in a db table and sorting it accoring to user selections. The annoy part is I have it working great on my local machine (EasyPhp 1.7) but when I put it on the main server (win2k) it stumbles and gives me an error everytime I call mysql_fetch_array example of script: $query = "SELECT ". $inv_items. " FROM inv_2004". $order_by; $result =mysql_query($query); while($row=mysql_fetch_array($result)) { echo"$row[item]\r"; } (eg of running script(not working)) http://jvlapps.nsuok.edu:8080/invent...b_display.php? order_sortby=sn&asc=asc can someone please point me in the right direction to figure this out? I am assuming that some setting difference between the two servers is the primary cause but I don't know where to look. N8 |
|
|||
|
You are either extremely advanced or completely lost....
this code | $query = "SELECT ". $inv_items. " FROM inv_2004". $order_by; | $result =mysql_query($query); makes no sense..... I imagine you mean this $huh= "whatever the heck column you want it ordered by"; $result=mysql_query("select inv_item,$huh from inv_2004 order by '$huh'"); assuming inv_2004 is a table.... item and $huh are column names (substitue $huh with a column name you want it ordered by) "CitizenX" <list_serve@No_hotmail-SPAM.com> wrote in message news:Xns94F07AA7BA42FlistserveNohotmailSP@129.250. 170.84... > Have a problem that is driving me nuts. I have a simple script for viewing > all the information in a db table and sorting it accoring to user > selections. The annoy part is I have it working great on my local machine > (EasyPhp 1.7) but when I put it on the main server (win2k) it stumbles and > gives me an error everytime I call mysql_fetch_array > > example of script: > > $query = "SELECT ". $inv_items. " FROM inv_2004". $order_by; > $result =mysql_query($query); > > while($row=mysql_fetch_array($result)) > { > echo"$row[item]\r"; > } > > (eg of running script(not working)) > http://jvlapps.nsuok.edu:8080/invent...b_display.php? > order_sortby=sn&asc=asc > > > can someone please point me in the right direction to figure this out? I am > assuming that some setting difference between the two servers is the > primary cause but I don't know where to look. > > > N8 |