Any ideas? I want to avoid having two "mysql_query($sql)". I'm basically looking for 
better functionality and wanting to learn how to clean up my code.

John Taylor-Johnston wrote:

> So I should break it up my two queries?
>
> $sql = 'insert into '.$db2.'.'.$table2.'(KW,AUS,GEO,AN,RB,CO,RR)
> select KW,AUS,GEO,AN,RB,CO,RR FROM '.$db.'.'.$table.'
> WHERE id='.$id.';';
>
>  mysql_query($sql);
>
> $sql = 'DELETE FROM '.$db.'.'.$table.' WHERE id='.$id.' LIMIT 1;';
> mysql_query($sql);
>
> Any suggestions how I could prompt in between to ask yes or no? PhpMyAdmin does it 
> with a javascript alert(). An easy answer? Maybe I'm being lazy?
>
> > For security reasons mysql_query does not support ; to separate queries.
> > phpmyadmin splits multiple query strings up (PMA_splitSqlFile())

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to