$conexao = mysql_connect("$host", "$username", "$password")or die("cannot connect");mysql_select_db("$db_name")or die("cannot select DB");onibus();function onibus(){$query = "SELECT * FROM onibus";$query2 = "SELECT * FROM horario_onibus";$sth = mysql_query($query);$sth2 = mysql_query($query2);if (mysql_errno()){echo mysql_error();}else{$rows = array();$rows2 = array();while($r = mysql_fetch_assoc($sth)){$rows[] = $r;print json_encode($rows);while($r = mysql_fetch_assoc($sth2)){$rows2[] = $r;print json_encode($rows2);}}}
$conexao = mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
onibus();
function onibus(){
$query = "SELECT * FROM onibus";
$query2 = "SELECT * FROM horario_onibus";
$sth = mysql_query($query);
$sth2 = mysql_query($query2);
if (mysql_errno()){
echo mysql_error();
}
else{
$rows = array();
$rows2 = array();
while($r = mysql_fetch_assoc($sth)){
$rows[] = $r;
print json_encode($rows);
while($r = mysql_fetch_assoc($sth2)){
$rows2[] = $r;
print json_encode($rows2);
}
}
}
--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
private void criaBanco1 (){try{bancoDados = openOrCreateDatabase("busao", MODE_WORLD_READABLE, null);String sql ="CREATE TABLE IF NOT EXISTS onibus "+"( _id INTEGER PRIMARY KEY, nome_onibus VARCHAR);";bancoDados.execSQL(sql);Log.i("TESTE", "BANCO CRIADO");}catch (Exception e) {// TODO: handle exceptionLog.i("TESTE", "ERRO AO CRIAR O BANCO"+e);}finally{bancoDados.close();}}private void criaBanco2(){try{bancoDados = openOrCreateDatabase("busao", MODE_WORLD_READABLE, null);String sql ="CREATE TABLE IF NOT EXISTS horario_onibus "+"(fk_id INTEGER PRIMARY KEY, horarios VARCHAR, dia VARCHAR, FOREIGN KEY(fk_id) REFERENCES onibus(_id));";bancoDados.execSQL(sql);Log.i("TESTE", "BANCO CRIADO2");}catch (Exception e) {// TODO: handle exceptionLog.i("TESTE", "ERRO AO CRIAR O BANCO"+e);}finally{bancoDados.close();}}
--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Sim... O próximo só inicia depois do término do anterior....
--
You received this message because you are subscribed to a topic in the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/androidbrasil-dev/qXBNoO69fWg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to androidbrasil-...@googlegroups.com.
Infelismente não...
Rudson,
Tenho certeza exatamente a mesma situação que você. Estou tentando começando a utilizar libs agora, estou are finalizando a PullToRefresh.
As telas que ainda não tem a lib, uso um botão mesmo para sincronizar. Quando tentei usar, tive problemas com a progress nas tasks.
Na sua opinião, qual a melhor maneira?
--
Via Dispositivo Móvel