English 中文(简体)
齐普案在理论中省略微:createquery-update()
原标题:zip file saves incomplete with doctrine::createquery->update()

I m 收到我需要拯救到数据库的齐普文档。 但这似乎没有得到完全的挽救。

在这项职能中:

public function executeUploadFile(sfWebRequest $request){

    if (!$_FILES[ file ][ error ]){
        $fn = $_FILES[ file ][ tmp_name ];
        $fh = fopen($fn, r+ );
        $fc = fread($fh, filesize($fn));
        mail( me@myemail.com , test 3 ,$fn. - .filesize($fn). - .strlen($fc));
        fclose($fh);
        move_uploaded_file($_FILES[ file ][ tmp_name ],dirname(__FILE__). / .$_FILES[ file ][ name ]);
        $q = Doctrine_Query::create()
            ->update( PrimhdLog )
            ->set( results , " ".mysql_escape_string($fc)." ")
            ->where("files_expected like  %".$_FILES[ file ][ name ]."% ");
        $sql = $q->getSqlQuery();
        print $sql;
        $uprows = $q->execute();
    }else{
        mail( me@myemail.com , uploadFile has error on file ,print_r($_FILES,1));
    }

    return sfView::NONE;
}

我的档案上载了4028,1658,2777的大小。 电子邮件记录和“ls -la”确认这些大小。

但是,SlectT char_length (results), length(results), primhd_log.* from primhd_log WHERE 1显示其面积分别为3900,1607,2692。

如何确定这一问题的想法?

FCCC/SBI/2008/2。

Schema:

PrimhdLog: actAs: Timestampable: created: name: created type: timestamp columns: id: { type: integer(4), notnull: true, unique: true, primary: true, autoincrement: true } created_by: { type: integer(4) } details: { type: clob(16000000), notnull: true } submitted: { type: timestamp } submitted_by: { type: integer(4) } results: { type: clob(16000000) } start: { type: timestamp } end: { type: timestamp } files_expected: { type: clob(16000000) } output_filename: { type: string(100) } relations: Creator: { class: Person, local: created_by, foreignAlias: CreatorPRIMHDLogList } Submitter: { class: Person, local: submitted_by, foreignAlias: SubmitterPRIMHDLogList }}

最佳回答

你们的阴谋是什么? 什么数据类型是将信息输入? 案文? blob?

齐普案卷载有许多特别的果园,即使我sql_e Jersey_string得起拖网,如果它带走了一些摇zy@或^M,那么它只是为了缩小规模而ski。

不仅有帮助,而且有想法

问题回答

暂无回答




相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

php return a specific row from query

Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...

Character Encodings in PHP and MySQL

Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

Averaging a total in mySQL

My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...

热门标签