最佳答案
我已经尝试按照 PHP.net 的说明进行 SELECT
查询,但是我不确定这样做的最佳方法。
如果可能的话,我想使用参数化的 SELECT
查询来返回 name
字段与参数匹配的表中的 ID
。这应该返回一个 ID
,因为它是唯一的。
然后,我想使用 ID
的 INSERT
到另一个表,所以我需要确定它是否成功。
我还读到您可以准备查询以便重用,但我不确定这有什么帮助。