You are here

function mobile_codes_save_mobile_code in Mobile Codes 6

Same name and namespace in other branches
  1. 5 mobile_codes.module \mobile_codes_save_mobile_code()

Save Mobile Code

1 call to mobile_codes_save_mobile_code()
mobile_codes_generate in ./mobile_codes.module
Generate a mobile code

File

./mobile_codes.module, line 180
Mobile Codes core functions

Code

function mobile_codes_save_mobile_code($data, $arguments, $image_path) {
  ksort($arguments);
  $data = serialize(array(
    'data' => $data,
    'arguments' => $arguments,
  ));
  db_query("INSERT {mobile_codes} (pid, data, file) VALUES (%d, '%s', '%s')", $arguments['preset'], $data, $image_path);
}