如何完全覆盖以前编辑的数据,使只有最新的一个显示在Codeigniter? [英] How do I completely overwrite previously edited data such that only the latest one is displayed in Codeigniter?

查看:82
本文介绍了如何完全覆盖以前编辑的数据,使只有最新的一个显示在Codeigniter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经检查过所有其他相关讯息,但找不到任何答案回答了我的具体问题。

I have checked all other related posts but 'could not find any that answers my specific question.

这里是我有:

<input name="job_id" type="hidden" value="<?= $this->uri->segment(3, 0); ?>" />
<?php foreach ($my_preference as $row) : 

if ( $row['status'] == "Open" ) {

    $bgcolor = "#ADD8E6";
}
else if ( $row['status'] == "Approved" ) {

    $bgcolor = "#8CBEE8";
}
else  {

    $bgcolor = "#EDC2B6";

}
?>

        <span style="font-size: 11pt" class="label label-info"> Proposal</span> &nbsp;&nbsp;&nbsp;
        <strong><?= $row['proposal'] ; ?></strong><br/><br/>
        <span style="font-size: 10pt" class="label label-info"> Job Status</span>&nbsp;&nbsp;&nbsp;
        <strong><?= $row['status'] ; ?></strong><br/><br/>
        <center><a href="<?=site_url()?>/provider/edit_proposal/<?= $row['job_id'] ?>" class="btn btn-primary btn-lg active" role="button">Edit Proposal</a></center>

目前,这允许我编辑我的提案数据。我的问题是,所有以前的数据显示在页面中,虽然每当我单击编辑按钮,将显示在文本框中的是最新的数据。我的问题是,我如何完全覆盖所有以前写(和已编辑)的数据?我只想显示页面上的最新数据。
我期待着得到任何可能的帮助。

Currently, this allows me to edit my proposal data. The problem I have is, all the previous data is shown in the page, although whenever I click the "Edit" button, what will be displayed on the textbox is the latest data. My question is, how do I completely overwrite all the previously written (and already edited) data? I want to show only the latest data on the page. I am looking forward to getting any possible help.

感谢这么多,有一个伟大的一天!

Thanks so much and have a great day!

推荐答案

确保您的浏览器没有缓存,还要键入此并查看它是否显示您想要的数据或其他

make sure your browser is not cached, also type this and see if it shows the data that you want or something else

<pre>
<?php print_r($row); ?>
<?php die(); ?>

这篇关于如何完全覆盖以前编辑的数据,使只有最新的一个显示在Codeigniter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆