Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Please tell me how to update and select data in in same query
- $query = "UPDATE `site` SET status = 1 JOIN SELECT `url` FROM `site`
- LIMIT 0,10";
- $result = mysql_query($query);
- while($row = mysql_fetch_array($result)) {
- $developer_records[] = $row;
- }
- //Download the file
- $filename = "export.xls";
- header("Content-Type: application/vnd.ms-excel");
- header("Content-Disposition: attachment; filename="$filename"");
- if(!empty($developer_records)) {
- foreach($developer_records as $record) {
- echo $record[url]."n";
- mysql_query("");
Add Comment
Please, Sign In to add comment