Re: Probleme with MySQL queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



But the DELETE is executed? If it is, and it's in the condition, likein the above code:
if ($row = mysql_fetch_assoc($query)) {   .... DELETE ...}
something apparently is fetched....
On Wed, Sep 3, 2008 at 8:49 PM, David DURIEUX <d.durieux@xxxxxxxxxxxxx> wrote:> Bonjour,>> Yes I'm using this query.... and no row select>> Cordialement,>> David DURIEUX> Tel : 04.74.04.81.34> Port : 06.34.99.45.18> Mail : d.durieux@xxxxxxxxxxxxx> Site Web : http://www.siprossii.com/>> SIPROSSII> 847 route de Frans (Créacité)> 69400 Villefranche sur Saône>>>> Le Wed, 3 Sep 2008 20:43:25 +0200> "Evert Lammerts" <evert.lammerts@xxxxxxxxx> a écrit:>>>Are you still using the code we talked about?>>>>if ($row = mysql_fetch_assoc($query)) {>>           var_dump ($row);>>           mysql_query("DELETE FROM table WHERE id={$row['id']}") or>>die("delete error: " . mysql_error());>>}>>>>if so, apparently it does fetch a row. Otherwise, can you send the>>code you're using?>>>>On Wed, Sep 3, 2008 at 8:35 PM, David DURIEUX>><d.durieux@xxxxxxxxxxxxx> wrote:>>> Bonjour,>>>>>> I have always the problem, select = 0 rows and it delete it like if>>> delete is before the select :/>>>>>> Cordialement,>>>>>> David DURIEUX>>> Tel : 04.74.04.81.34>>> Port : 06.34.99.45.18>>> Mail : d.durieux@xxxxxxxxxxxxx>>> Site Web : http://www.siprossii.com/>>>>>> SIPROSSII>>> 847 route de Frans (Créacité)>>> 69400 Villefranche sur Saône>>>>>>>>>>>> Le Wed, 3 Sep 2008 20:05:22 +0200>>> "Evert Lammerts" <evert.lammerts@xxxxxxxxx> a écrit:>>>>>>>On Wed, Sep 3, 2008 at 7:58 PM, Evert Lammerts>>>><evert.lammerts@xxxxxxxxx> wrote:>>>>> On Wed, Sep 3, 2008 at 7:41 PM, Dee Ayy <dee.ayy@xxxxxxxxx> wrote:>>>>>> When using mysql_query, the SQL string to be executed should not>>>>>> end in a semicolon.>>>>>>>>>> Ending a query with a semicolon should not be a problem - the>>>>> string is parsed by the mysql server, which handles it fine.>>>>>>>>The manual does mention it, I'm a little too quick with my replies. I>>>>personally never had a problem with it though. Plus, it seemed to>>>>work some mails ago.>>>>>>>>David, did I understand well that your problem is solved?>>>>>>>>>>>>> -->>> PHP Database Mailing List (http://www.php.net/)>>> To unsubscribe, visit: http://www.php.net/unsub.php>>>>>>>>> --> PHP Database Mailing List (http://www.php.net/)> To unsubscribe, visit: http://www.php.net/unsub.php>>

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux