| @@ 857-880 (lines=24) @@ | ||
| 854 | * @param boolean $with_values |
|
| 855 | * @return resource |
|
| 856 | */ |
|
| 857 | function _executeInsertAct($queryObject, $with_values = TRUE) |
|
| 858 | { |
|
| 859 | if($this->use_prepared_statements == 'Y') |
|
| 860 | { |
|
| 861 | $this->param = $queryObject->getArguments(); |
|
| 862 | $with_values = FALSE; |
|
| 863 | } |
|
| 864 | $query = $this->getInsertSql($queryObject, $with_values); |
|
| 865 | if(is_a($query, 'BaseObject')) |
|
| 866 | { |
|
| 867 | unset($this->param); |
|
| 868 | return; |
|
| 869 | } |
|
| 870 | ||
| 871 | $query .= (__DEBUG_QUERY__ & 1 && $this->query_id) ? sprintf(' ' . $this->comment_syntax, $this->query_id) : ''; |
|
| 872 | ||
| 873 | $result = $this->_query($query); |
|
| 874 | if($result && !$this->transaction_started) |
|
| 875 | { |
|
| 876 | $this->_commit(); |
|
| 877 | } |
|
| 878 | unset($this->param); |
|
| 879 | return $result; |
|
| 880 | } |
|
| 881 | ||
| 882 | /** |
|
| 883 | * Handles updateAct |
|
| @@ 888-912 (lines=25) @@ | ||
| 885 | * @param boolean $with_values |
|
| 886 | * @return resource |
|
| 887 | */ |
|
| 888 | function _executeUpdateAct($queryObject, $with_values = TRUE) |
|
| 889 | { |
|
| 890 | if($this->use_prepared_statements == 'Y') |
|
| 891 | { |
|
| 892 | $this->param = $queryObject->getArguments(); |
|
| 893 | $with_values = FALSE; |
|
| 894 | } |
|
| 895 | $query = $this->getUpdateSql($queryObject, $with_values); |
|
| 896 | if(is_a($query, 'BaseObject')) |
|
| 897 | { |
|
| 898 | unset($this->param); |
|
| 899 | return; |
|
| 900 | } |
|
| 901 | ||
| 902 | $query .= (__DEBUG_QUERY__ & 1 && $this->query_id) ? sprintf(' ' . $this->comment_syntax, $this->query_id) : ''; |
|
| 903 | ||
| 904 | $result = $this->_query($query); |
|
| 905 | ||
| 906 | if($result && !$this->transaction_started) |
|
| 907 | { |
|
| 908 | $this->_commit(); |
|
| 909 | } |
|
| 910 | unset($this->param); |
|
| 911 | return $result; |
|
| 912 | } |
|
| 913 | ||
| 914 | /** |
|
| 915 | * Handles deleteAct |
|
| @@ 920-945 (lines=26) @@ | ||
| 917 | * @param boolean $with_values |
|
| 918 | * @return resource |
|
| 919 | */ |
|
| 920 | function _executeDeleteAct($queryObject, $with_values = TRUE) |
|
| 921 | { |
|
| 922 | if($this->use_prepared_statements == 'Y') |
|
| 923 | { |
|
| 924 | $this->param = $queryObject->getArguments(); |
|
| 925 | $with_values = FALSE; |
|
| 926 | } |
|
| 927 | $query = $this->getDeleteSql($queryObject, $with_values); |
|
| 928 | if(is_a($query, 'BaseObject')) |
|
| 929 | { |
|
| 930 | unset($this->param); |
|
| 931 | return; |
|
| 932 | } |
|
| 933 | ||
| 934 | $query .= (__DEBUG_QUERY__ & 1 && $this->query_id) ? sprintf(' ' . $this->comment_syntax, $this->query_id) : ''; |
|
| 935 | ||
| 936 | $result = $this->_query($query); |
|
| 937 | ||
| 938 | if($result && !$this->transaction_started) |
|
| 939 | { |
|
| 940 | $this->_commit(); |
|
| 941 | } |
|
| 942 | ||
| 943 | unset($this->param); |
|
| 944 | return $result; |
|
| 945 | } |
|
| 946 | ||
| 947 | /** |
|
| 948 | * Handle selectAct |
|