Click here to Skip to main content
15,914,767 members
Home / Discussions / Database
   

Database

 
GeneralSelect MID?? instead of TOP Pin
krisp16-Feb-04 11:26
krisp16-Feb-04 11:26 
GeneralRe: Select MID?? instead of TOP Pin
John Kuhn16-Feb-04 11:46
John Kuhn16-Feb-04 11:46 
GeneralRe: Select MID?? instead of TOP Pin
krisp16-Feb-04 11:52
krisp16-Feb-04 11:52 
GeneralRe: Select MID?? instead of TOP Pin
John Kuhn16-Feb-04 15:13
John Kuhn16-Feb-04 15:13 
GeneralSQL Server 2000 Connection From ASP Pin
SamAmman15-Feb-04 22:32
SamAmman15-Feb-04 22:32 
GeneralRe: SQL Server 2000 Connection From ASP Pin
Marcie Jones16-Feb-04 2:59
Marcie Jones16-Feb-04 2:59 
GeneralRe: SQL Server 2000 Connection From ASP Pin
Mike Dimmick17-Feb-04 6:41
Mike Dimmick17-Feb-04 6:41 
GeneralBoy I have a goober of a problem. Pin
Anonymous15-Feb-04 21:23
Anonymous15-Feb-04 21:23 
I don't know if I should put this under php or sql, but it is a little of both. I have secure info that I do not want published to a file on the server at any time even a few seconds. I just want to take it strait out of the data base and have the person click a link, to this php file below and when they go to it it prompts them to download. I want the sql info in the file. I think I have most of the code right, but it isn't quite working. As of now, it is downloading a blank file.
<br />
<?php<br />
<br />
function show_file_information($filename)<br />
{<br />
	@readfile($filename);<br />
}<br />
<br />
if(!class_exists(MySQL))<br />
{<br />
	require '../home/MySQL.php';<br />
	require '../home/conf_global.php';<br />
	$mysql = new MySQL();<br />
	$mysql->connect($INFO['sql_user'],$INFO['sql_pass'],$INFO['sql_database'],$INFO['sql_host']);<br />
}<br />
<br />
$news_result = $mysql->query("SELECT * FROM newsletters WHERE id='1'");<br />
$news = mysql_fetch_assoc($news_result);<br />
<br />
$filename = $news['add_id'];<br />
<br />
header("Pragma: public");<br />
header("Expires: 0");<br />
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); <br />
header("Content-Type: application/force-download");<br />
header("Content-Type: application/octet-stream");<br />
header("Content-Type: application/download");<br />
header("Content-Disposition: attachment; filename=".basename(emaillist).".txt");<br />
header("Content-Transfer-Encoding: binary");<br />
header("Content-Length: ".strlen($filename));<br />
//@readfile("$filename"); <br />
<br />
<br />
?>

GeneralProblem with simple SQL query :D Pin
gamerPotatoe15-Feb-04 21:10
gamerPotatoe15-Feb-04 21:10 
GeneralRe: Problem with simple SQL query :D Pin
Mazdak15-Feb-04 21:29
Mazdak15-Feb-04 21:29 
GeneralConcatenating variables in SQL query Pin
solostar***15-Feb-04 16:19
solostar***15-Feb-04 16:19 
GeneralRe: Concatenating variables in SQL query Pin
Mike Dimmick16-Feb-04 2:32
Mike Dimmick16-Feb-04 2:32 
GeneralRe: Concatenating variables in SQL query Pin
Bill Dean16-Feb-04 2:34
Bill Dean16-Feb-04 2:34 
GeneralFree C# training Pin
Anonymous15-Feb-04 15:14
Anonymous15-Feb-04 15:14 
GeneralRe: Free C# training Pin
John Kuhn16-Feb-04 11:49
John Kuhn16-Feb-04 11:49 
GeneralProblem in using Stream object's write method Pin
Member 48497613-Feb-04 21:15
Member 48497613-Feb-04 21:15 
GeneralODBC and TCP/IP Pin
Kwai Cheng Kane13-Feb-04 10:25
Kwai Cheng Kane13-Feb-04 10:25 
QuestionListing tables and views? Pin
Bill Dean13-Feb-04 8:08
Bill Dean13-Feb-04 8:08 
AnswerRe: Listing tables and views? Pin
-Dr_X-13-Feb-04 14:27
-Dr_X-13-Feb-04 14:27 
GeneralRe: Listing tables and views? Pin
Bill Dean13-Feb-04 15:08
Bill Dean13-Feb-04 15:08 
GeneralRe: Listing tables and views? Pin
-Dr_X-13-Feb-04 15:36
-Dr_X-13-Feb-04 15:36 
GeneralRe: Listing tables and views? Pin
Bill Dean13-Feb-04 15:43
Bill Dean13-Feb-04 15:43 
Generalcompare time part of datetime field Pin
asd175313-Feb-04 7:15
asd175313-Feb-04 7:15 
Generalprecentage of loading data in Dataset Pin
Saeed Tabrizi13-Feb-04 5:43
Saeed Tabrizi13-Feb-04 5:43 
General&quot;Select top&quot; command Pin
dlhson212-Feb-04 19:21
dlhson212-Feb-04 19:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.