Search Results

Search found 4 results on 1 pages for 'gosha'.

Page 1/1 | 1 

  • how not to update timestamp field

    - by GOsha
    project is written on php. There is timestamp field in mysql it updates automatically. In one case I don`t need update this field. Can I gibe instruction not to update this field in this queries without getting timestamp value.

    Read the article

  • error in running recursion

    - by GOsha
    if running function returns server misconfiguration error function build_path($cid) { $result = array(); $DB = new MySQLTable; $DB->TblName = 'shop_categories'; $where['cat_id']['='] = $DB->CleanQuest($cid); $res = $DB->Select('cat_id,cat_name,cat_parent', $where); if($res !== 'false') { $pid = mysql_fetch_array($res); if($pid['cat_parent'] !== 0) { Echo $pid['cat_parent']; build_path($pid['cat_parent']); } else { Echo $pid['cat_id']; return true; } } return false; } I can't find an error here. Please help. Sorry for disturbing you all. The trouble was in comparison 'if($pid['cat_parent'] !== 0)': $pid['cat_parent'] was a string with int(0) Can i build this function to store full path without using GLOBALS and SESSION vars?

    Read the article

  • how to return static variable PHP

    - by GOsha
    function build_path($cid) { static $fr=array(); $DB = new MySQLTable; $DB->TblName = 'shop_categories'; $where['cat_id']['='] = $cid; $res = $DB->Select('cat_id,cat_name,cat_parent', $where); if($res !== false) { $pid = mysql_fetch_array($res); if($pid['cat_parent'] !== "0") { $fr[] = $pid['cat_id']; build_path($pid['cat_parent']); } else { $fr[] = $cid; $fr = array_reverse($fr); print_r($fr); return $fr; } } } print_r(build_path(100)); Why is working print_r in function, but second print_r returns NULL?

    Read the article

1