fesan Posted March 24, 2009 Share Posted March 24, 2009 Hi... This code results in this error: Unknown column 'Ny_test' in 'where clause' Cant figure out why it results in this error. I have a column named gruppe_navn, and i have double checked it several times. $_GET[gruppe] gives in this case Ny_nest, and i have a field in the column gruppe_navn named Ny_test... Can anyone help me? <?php $query = "SELECT * FROM $dbtable WHERE gruppe_navn = $_GET[gruppe]"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); $mysql_select = $row['list_include']; ?> Link to comment https://forums.phpfreaks.com/topic/150847-solved-mysql_fetch_array-error/ Share on other sites More sharing options...
Yesideez Posted March 24, 2009 Share Posted March 24, 2009 $query = "SELECT * FROM $dbtable WHERE gruppe_navn = '$_GET[gruppe]'"; Do you have a field called "list_include"? $mysql_select = $row['list_include']; Link to comment https://forums.phpfreaks.com/topic/150847-solved-mysql_fetch_array-error/#findComment-792425 Share on other sites More sharing options...
fesan Posted March 24, 2009 Author Share Posted March 24, 2009 ahhhhh.... thanks... I should have thought of the ''..... $me = "start to use the brain"; Thanks again! Solved the issue! Link to comment https://forums.phpfreaks.com/topic/150847-solved-mysql_fetch_array-error/#findComment-792427 Share on other sites More sharing options...
Yesideez Posted March 24, 2009 Share Posted March 24, 2009 btw, var_dump is your friend... var_dump($row); Add that after you assign $row a value. The page may appear a little messy but right-click and view source to see what you're getting back. Link to comment https://forums.phpfreaks.com/topic/150847-solved-mysql_fetch_array-error/#findComment-792428 Share on other sites More sharing options...
fesan Posted March 24, 2009 Author Share Posted March 24, 2009 I'll try it out.... Also I'm not the best to use /n... so my pages are VERY wide... Link to comment https://forums.phpfreaks.com/topic/150847-solved-mysql_fetch_array-error/#findComment-792434 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.