Jump to content

burgergetsbored

Members
  • Posts

    4
  • Joined

  • Last visited

burgergetsbored's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'd rather use SQL as this is the only bit I'm struggling with and all the rest works okay for this small project! But if there's no real easy way then that may become a problem.
  2. Ah okay then. So would there be no way of doing it in just SQL then?
  3. I've never used mysqli before, and all my current code is in sql or does that not matter ? I tried using $query=mysql_query('SHOW COLUMNS FROM table ') or die(mysql_error()); while($field=mysql_fetch_object($query)){ $fields[]=$field; }; print_r($fields); foreach($fields as $key=>$field){ echo $field->Field.'</br>'; which worked for most of the columns but the first one produced a massive error
  4. Hey all I'm trying to do is echo out the column names from my sql table rather than the content. Everyone online seems to recommend mysql_fetch_field() but phps documentation say it's becoming deprecated now ? And other examples use quite a bit of code. Is there no simple way of doing this?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.