我有表和列id,值为1,2,3,...,10,11,12,13.如何从varchar类型查询get max id?我试过了
select MAX(id) from table
Run Code Online (Sandbox Code Playgroud)
但结果是9,请帮帮忙?
我有这样的 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)