Print Page | Close Window

asp connection with mysql

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=24212
Printed Date: 29 March 2026 at 12:34am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: asp connection with mysql
Posted By: foxy
Subject: asp connection with mysql
Date Posted: 18 August 2007 at 11:38am
Hi,
 
i'm a total noob in asp, and i only need a couple of lines for them. The only thing i 'm looking for is the script to connect with a db and query it.
Is there someone who can translate this script form php to asp? it would help me a lot. thx
 

@ $db = mysql_pconnect('localhost', 'username' , 'password');

if (!$db)

{

echo 'Error: Can not connect.';

exit;

}

mysql_select_db('dbname');

$query = 'select * from table '

."where id='$id' ";

$result = mysql_query($query);

$row = mysql_fetch_array($result);

echo'The ID is: '.$row[id].'';



Replies:
Posted By: foxy
Date Posted: 18 August 2007 at 10:51pm
Nobody who can help me?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net