Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old January 28th, 2003, 06:37 PM
info2sri info2sri is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hyd
Posts: 14 info2sri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Help Required ??

Hi All,

I was trying to get connect to mysql server on web server, but the web server doesn't allow the connection string, it insists me using the DSN. So, can any one help me out in letting how to replace the connection string with DSN name in the below listed code.

<?php


$connect = mysql_connect();


if(!$connect){
echo "Could not etsablish connection to mySQL!";
exit;
}


$database = "dvd_listings";

//Place Holder for Connection String ,which needs to be replaced with an DSN.
$dbb = msql_select_db($database,$connect) or die("Unable to select Database!");


$sql = "SELECT * FROM dvd_main";


$sql_result = mysql_query($sql,$connect);


echo "<table border=1>";
echo "<tr><td>DVD Title</td></tr>";


while($row = mysql_fetch_array($sql_result)){


$title = $row["main_title"];
echo "<tr><td>$title</td></tr>";


}


echo "</table>";


mysql_free_result($sql_result);
mysql_close($connection);
?>

Reply With Quote
  #2  
Old January 29th, 2003, 02:15 PM
DaemonJ DaemonJ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Jamestown, TN USA
Posts: 61 DaemonJ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Help Required ??

Download and install MyODBC (http://www.mysql.com/downloads/api-myodbc.html).

Reply With Quote
  #3  
Old January 29th, 2003, 03:07 PM
info2sri info2sri is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hyd
Posts: 14 info2sri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: RE: Help Required ??

Hey,

I have myodbc driver installed thats not an issue, I waana know where and how do I use the DSN name in teh above code, as it is a DSN-Less connection code but I wanna Use one with DSN, so kindly let me know where can I get the info

Bye



Quote:
Download and install MyODBC (http://www.mysql.com/downloads/api-myodbc.html).


Reply With Quote
  #4  
Old January 29th, 2003, 03:29 PM
DaemonJ DaemonJ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Jamestown, TN USA
Posts: 61 DaemonJ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Help Required ??

You have to use ODBC_Connect (http://www.php.net/manual/en/function.odbc-connect.php).

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > Help Required ??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway