NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Help needed for connection to MYSQL database

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 05-17-2005, 03:49 AM THREAD STARTER               #1 (permalink)
NamePros Regular
 
chelsea's Avatar
Join Date: Jun 2003
Location: Mars or Moon or ...
Posts: 909
chelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nice
 



Help needed for connection to MYSQL database


Hi,

One of my sites is not working properly.
There is something wrong with the connection to the MYSQL database.

For certain reasons I do not want to pst URL here.
If you think you can help, please PM me for further details.


Kind regards
Chels
__________________
JJH.EU - KOA.EU - KLN.EU
chelsea is offline  
Old 05-17-2005, 11:19 AM   #2 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
either post the error message here or pm it to me will see if I can work it out
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 05-17-2005, 02:00 PM   #3 (permalink)
Senior Member
 
Ben42's Avatar
Join Date: Jan 2005
Location: Chi-Town
Posts: 2,068
Ben42 has a reputation beyond reputeBen42 has a reputation beyond reputeBen42 has a reputation beyond reputeBen42 has a reputation beyond reputeBen42 has a reputation beyond reputeBen42 has a reputation beyond reputeBen42 has a reputation beyond reputeBen42 has a reputation beyond reputeBen42 has a reputation beyond reputeBen42 has a reputation beyond reputeBen42 has a reputation beyond repute
 



If you post it we can work on it together...otherwise, you might find what your looking for through PM.

I can see why you wouldn't want to post a link though.
Ben42 is offline  
Old 05-18-2005, 01:40 AM   #4 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
it turns out he never had a backup of his database so obviously error message popped up.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 05-18-2005, 08:04 AM THREAD STARTER               #5 (permalink)
NamePros Regular
 
chelsea's Avatar
Join Date: Jun 2003
Location: Mars or Moon or ...
Posts: 909
chelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nice
 



okay,
so as I obviously have no database anymore, but only the "normal" files, is it possible to re-build or re-store the database from the files?

For example in this file there are some queries and I wonder if the database could be build new when I get all queries from all files : ( please do not laugh, I honestly don´t know about it...)
------------------------------------------------------
<?php
include "paging.cls.php";


$paging=new clPaging();
//set vars
if(isset($HTTP_GET_VARS["start"])) $paging->clPaging_setStart($HTTP_GET_VARS["start"]);
if(isset($HTTP_GET_VARS["fix"])) $paging->clPaging_setFix($HTTP_GET_VARS["fix"]);
if(isset($HTTP_GET_VARS["pp"])) $paging->clPaging_setPerPage($HTTP_GET_VARS["pp"]);
if(isset($HTTP_GET_VARS["cat"])) $paging->clPaging_setCat($HTTP_GET_VARS["cat"]);
else $paging->clPaging_setPerPage("5");

//create query
$selectResults="SELECT * ";
$selectCount="SELECT COUNT(*) AS count ";
$mainQuery="FROM hotels_list where city= '$cat' and state";

$setLimits=" LIMIT ".$paging->clPaging_getStart().",".$paging->clPaging_getPerPage();
$Results=mysql_query($selectResults.$mainQuery.$se tLimits);
?>

<?

if(!$cat==""){
//$data_query = "select * from soft_data where software_category='$cat'";



?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="8">
<tr>
<td valign="top">
<? if(!$cat==""){
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td class="line"> &nbsp;Results for City --&gt;
<?= $cat ?>
</td>

</tr>
</table>
<? } ?>
<br>
<!-- main contents -->
<?

while($row = mysql_fetch_object($Results))
{

$hid= $row->id;
$name = $row->name;
$address = $row->address1;
$pic_id = $row->id;
$star_rating= $row->star_rating;
$amenities= $row->amenities;
$overview= $row->overview;

?>
<table width="85%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="middle">
<tr>
<td width="20" height="17" valign="top" background="images/middle_left.jpg" ></td>
<td align="left" valign="middle"> &nbsp;&nbsp;
<?= $name ?>
&nbsp;
<?= $address ?>
</td>
<td width="125" align="right" valign="top" class="text">
<?
if (!$star_rating =="")
{

?>
<?= $star_rating ?>
<img src="images/star.gif" align="absmiddle">
<?
}
else
{
?>
<img src="images/star.gif" align="absmiddle">
<?
}
?>
&nbsp; </td>
<td width="26" height="7" align="right" valign="top" ><img src="images/line.jpg" width="26" height="7"></td>
<td width="10" valign="top"></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="1" cellspacing="1" class="middle">
<tr>
<td width="95" height="95" rowspan="3" align="left" valign="top">
<img src='http://images.wctravel.com/images-logos/<?= $pic_id ?>.gif' width='95' height='95' border='0'>
</td>
<td align="left" valign="top" width="634">
<table width="100%" height="100%" border="0" cellpadding="1" cellspacing="1" class="text">
<!--
<tr>
<td width="10" valign="top"></td>
<td valign="top" class="text"> Hotel Name
<?= $name ?>
</td>
????: NamePros.com http://www.namepros.com/programming/90807-help-needed-for-connection-mysql-database.html
</tr>
-->
<tr>
<td width="10" valign="top"></td>
<td valign="top" class="text">Amenities:
<!-- Address <?= $address ?> -->

</td>
</tr>
<tr>
<td width="10" valign="top"></td>
<td valign="top" class="text">

<?


$mystring = $amenities ;
$length = strlen($mystring);
//echo "Original String \"$mystring\" is $length characters.<br />";

$counter= 0;

$output = array();


for($i=1;$i<$length;$i++){
$amenities=$output[$i] = substr($mystring, $counter, 3);
//print "Array Value:-".$counter."-".$output[$i]."<br />";

$select_query_counter="select * from amenity_list where id='$amenities'";
$query_result_counter= mysql_query($select_query_counter, $db_connection);

while($row = mysql_fetch_object($query_result_counter))
{
$amenity_name = $row->name;
print $amenity_name."<br>";
}

$counter = $counter+4;
}

?>
</td>
</tr>
<tr>
<td width="10" valign="top"></td>
<td align="left" valign="bottom" class="text">
<a href="available_hotel.php?hid=<?=$hid?>&hn=<?=$nam e?>&cn=<?=$cat?>&sn=<?=$state?>"><img src="images/more_info.jpg" width="83" height="17" border="0" align="absmiddle"></a></td>
</tr>
<tr> </tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br>
<? }?>
<? if(!$cat==""){ ?>
<table border="0" width="100%" cellpadding="2">
<tr>
<td class="headertd">
<?
$paging->clPaging_setQuery($selectCount.$mainQuery);
$paging->clPaging_Pagination();
?>
Total Results Found
<?= $paging->clPaging_getRecords(); ?>
</td>
<td align="right" class="headertd">
<?= $paging->clPaging_getPageNo(); ?>
<br></td>
</tr>
<tr>
<td colspan='2' class="headertd" align="center">
<?= $paging->clPaging_getPreviousLink(); ?>
&nbsp;&nbsp;&nbsp;
<?= $paging->clPaging_getPages(); ?>
&nbsp;&nbsp;&nbsp;
<?= $paging->clPaging_getNextLink(); ?>
<? }else{
????: NamePros.com http://www.namepros.com/showthread.php?t=90807

//print"<table><tr><td><span class='text'>Please Select Category from Right links to browse our huge database.</span></td></tr></table>";
} ?>
</td>
</tr>
</table>

</td>
</tr>
</table></td>

</tr>
</table>

</td>

</tr>
</table>
<?
}
else{
print "select country";
}
?>
__________________
JJH.EU - KOA.EU - KLN.EU
chelsea is offline  
Old 05-19-2005, 12:55 AM   #6 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
yes it is possible but would have to go through each script and see what table and fields the scripts use and what it populates it with.

The script you are using did you download it from somewhere? If so you should be able to download it again and run the supplied SQL.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Install the Apache Web Server, Perl, PHP, and MySQL on Windows deadserious Webmaster Tutorials 96 05-27-2007 02:24 PM
Tutorial: How to Install Apache2 MySQL and PHP on Windows deadserious Webmaster Tutorials 35 09-21-2005 10:46 PM
Upload Image to Mysql Database with PHP squeaky14 Webmaster Tutorials 3 04-14-2005 11:23 AM
Tutorial: Getting Started With MySQL (The Basics) deadserious Webmaster Tutorials 3 04-18-2004 02:17 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 10:43 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger