Having trouble parsing a MySQL result in php -


I am trying to draw some results from a database, but I think that like today I have the brain's brain . > $ mascara = "Choose from * to" "WHERE player_id = '" $ Userid "'"; $ Castresult = mysql_query ($ castquery) or die (mysql_error ()); $ Castro = mysql_fetch_array ($ castresult);

...

foreach ($ castro ['cast_id'] as the $ caster) {echo "

; If ($ caster ['avatar_url']! = '') Echo "lt; img src = \" "$ caster ['avatar_url']." \ "Alt = \" ". $ Caster ['name']" \ "& gt;"; Copy "& lt; a href = \"? Edit = ". $ Caster ['cast_id']." \ "& Gt;" $ Caster ['name'] "& Lt; / a & gt; & lt; / p & gt;"; }

Of course I'm just looking somewhere here.

Not sure what your DB structure is, but $ castrow ['cast_id'] is one area, not an array. What do you mean:

  and instead of {$ castro = mysql_fetch_array ($ castresult)} {// use $ castrow array here}  

instead of < Code> foreach


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -