Author: Antonie Potgieter

MySQL : Check if field exists

Sometimes, you need to check if a field exists in a table and if it doesn’t, you need to add it to the table and ensure that its there. Below is a snippet which you can use a reference for checking whether a field/column exists in a MySQL database table. $tableFields = mysql_list_fields("databasename", "tablename"); $columns = mysql_num_fields($fields); for ($i = 0; $i < $columns; $i++) { $field_array[] = mysql_field_name($fields, $i); } if (!in_array('list_id', $field_array)) { mysql_query("ALTER TABLE `tablename` ADD `fieldname` INT(11) NOT NULL DEFAULT '1';"); } I hope that you find this useful. The code above should give you a good idea of how to do...

Read More

WordPress : Download Older Versions

In case you might need to download an older version of WordPress than the current, latest release, you can go to the release archive and obtain any of the previous releases as needed. And then, you can view all the WordPress release changelogs to see what changes have been made in each version which has been...

Read More

contridfx Live Stream

Watch me play live game streams!

Sorry, there’s no live stream at the moment. Please check back later or take a look at all of my videos.

Subscribe/like me on YouTube, Facebook, Mixer or Twitch to be notified when I go live! Thank you for your support!

Stay up to date

Get one email per month with latest news. You can unsubscribe at any time

Fill in a valid email

captcha

Pin It on Pinterest

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!