Jump to content

holiks

Members
  • Posts

    83
  • Joined

  • Last visited

    Never

Everything posted by holiks

  1. something along the lines of.... $sql = \'SELECT desired_field_or_all FROM ur_table\'; $result = @mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_array($result)) { $field_value = $row[\'desired_field\']; list($part_a, $part_b) = explode(\'-\', $field_value); if(strlen($part_b) is less than 4) { //prepend 0\'s and implode with $part_a ...and a dash;) //of course this loop may go further becuase it could be 1, 2 or 3 less; //then update same field in db with new $field_value; } ..on a note i myself am learning php so the (pseudo)code may not be perfect
×
×
  • 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.