Jump to content
  • 0

PHP - Get guild_id


Vincent

Question


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Hello,

i create at the moment a own Flux Addon.

So at the moment i need the guild_ids from the acc that are atm logged to flux.

For some reason the array is empty.

 

Any idea how to fix it?

 

Here my code:

$sql = "SELECT guild_id FROM {$server->charMapDatabase}.char WHERE account_id = 2000000";
$sth = $server->connection->getStatement($sql);
$guild = $sth->fetchAll();		

Edited by Vincent
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Try using fetch(); instead of fetchAll();

if i change it to fetch() the array is filled with "bool(false)"

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Thanks it works.

Link to comment
Share on other sites

×
×
  • Create New...