小编N4t*_*ata的帖子

如何查询varchar类型的get max id和numeric中的值?

我有表和列id,值为1,2,3,...,10,11,12,13.如何从varchar类型查询get max id?我试过了

select MAX(id) from table
Run Code Online (Sandbox Code Playgroud)

但结果是9,请帮帮忙?

php mysql max

5
推荐指数
1
解决办法
2349
查看次数

如何使用PHP更新xml文件?

我有这样的 xml 文件 --> examples.xml

<?xml version="1.0" encoding="UTF-8"?>
<inventors>
 <person>
 <name>anie</name>
 <comment>good</comment>
 </person>
</inventors>
Run Code Online (Sandbox Code Playgroud)

这是我的 php 文件 --> index.php

<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<?php
 $xml = new DOMDocument('1.0', 'utf-8');
 $xml->formatOutput = true;
 $xml->preserveWhiteSpace = false;
 $xml->load('examples.xml');

 //Get item Element
 $element = $xml->getElementsByTagName('person')->item(0);

 //Load child elements
 $name = $element->getElementsByTagName('name')->item(0);
 $comment = $element->getElementsByTagName('comment')->item(0);

 //Replace old elements with new
 $element->replaceChild($name, $name);
 $element->replaceChild($comment, $comment);
 ?>

 <form method="POST" action=''>
  name <input type="text-name" value="<?php echo $name->nodeValue  ?>" name="namanya" />
comment  <input type="text-comment" value="<?php echo $comment->nodeValue  ?>"  name="commentnya"/>
 <input …
Run Code Online (Sandbox Code Playgroud)

php xml refresh

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

php ×2

max ×1

mysql ×1

refresh ×1

xml ×1