Guest User

Untitled

a guest
Apr 23rd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. //Please tell me how to update and select data in in same query
  2. $query = "UPDATE `site` SET status = 1 JOIN SELECT `url` FROM `site`
  3. LIMIT 0,10";
  4. $result = mysql_query($query);
  5. while($row = mysql_fetch_array($result)) {
  6. $developer_records[] = $row;
  7. }
  8. //Download the file
  9. $filename = "export.xls";
  10. header("Content-Type: application/vnd.ms-excel");
  11. header("Content-Disposition: attachment; filename="$filename"");
  12.  
  13. if(!empty($developer_records)) {
  14. foreach($developer_records as $record) {
  15. echo $record[url]."n";
  16. mysql_query("");
Add Comment
Please, Sign In to add comment