PHP / MySQLi - 在循环时运行困难

时间:2015-12-20 13:23:50

标签: php mysqli

这是我的代码:

$v = $conn->query("SELECT * FROM `categories` WHERE `Link`!=''");


while($vrowi = mysql_fetch_array($v, MYSQLI_ASSOC))

{

$url = $vrowi['Link'];  
$Cat = $vrowi['id'];
}

while循环不起作用。你能告诉我错误在哪里吗?提前谢谢!

1 个答案:

答案 0 :(得分:0)

您将面向对象的MySQLi代码与功能方法混合在一起,需要选择其中一种。确切地说,解决方案就是:

@Component
public final class CassandraStorageServiceImpl implements CassandraStorageService {

    @ServiceActivator(inputChannel="consulAgentSelfFileChannel")
    @Override
    public void store(AgentSelfResult agentSelfResult) {
        //use spring-data-cassandra repository to store
        LOG.info("Received 'AgentSelfResult': {}...");
        LOG.info("Trying to store 'AgentSelfResult' in Cassandra cluster...");
    }
}