简体   繁体   English

自动递增下一个数字PHP

[英]Auto increment next number PHP

Can someone please help me. 有人可以帮帮我吗。 I need to get the next auto incremented number from a certain table. 我需要从某个表中获取下一个自动递增的数字。

            <th class="width1">
                <?php echo _l('Job Number:'); ?>
            </th>
            <td>
                <input type="text" name="name" id="job_name" value="<?php echo htmlspecialchars($job['name']); ?>" />

; ;

            </td>

where would and what would I add to this to achieve what I want. 为了达到我想要的目标,我将在何处添加什么? I have tried a few things but its driving me crazy. 我已经尝试了一些方法,但是它使我发疯。

Any help appreciated thanks. 任何帮助表示感谢。

Ash

SELECT AUTO_INCREMENT
FROM information_schema.tables
WHERE table_name = 'table'
AND table_schema = DATABASE()

You can run this query to find out the next auto increment of a table 您可以运行此查询来查找表的下一个自动增量

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM