[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 05-17-2005, 02:49 AM   #1 (permalink)
NamePros Regular
 
chelsea's Avatar
 
Join Date: Jun 2003
Location: Mars or Moon or ...
Posts: 907
85.75 NP$ (Donate)

chelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nicechelsea is just really nice


Arrow 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, 10:19 AM   #2 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

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, 01:00 PM   #3 (permalink)
Senior Member
 
Ben42's Avatar
 
Join Date: Jan 2005
Posts: 1,591
38.00 NP$ (Donate)

Ben42 is a splendid one to beholdBen42 is a splendid one to beholdBen42 is a splendid one to beholdBen42 is a splendid one to beholdBen42 is a splendid one to beholdBen42 is a splendid one to beholdBen42 is a splendid one to behold


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.
__________________
Your Name Here
Ben42 is online now  
Old 05-18-2005, 12:40 AM   #4 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

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, 07:04 AM   #5 (permalink)
NamePros Regular
 
chelsea's Avatar
 
Join Date: Jun 2003
Location: Mars or Moon or ...
Posts: 907
85.75 NP$ (Donate)

chelsea 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>
</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{

//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-18-2005, 11:55 PM   #6 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 01:24 PM
Tutorial: How to Install Apache2 MySQL and PHP on Windows deadserious Webmaster Tutorials 35 09-21-2005 09:46 PM
Upload Image to Mysql Database with PHP squeaky14 Webmaster Tutorials 3 04-14-2005 10:23 AM
Tutorial: Getting Started With MySQL (The Basics) deadserious Webmaster Tutorials 3 04-18-2004 01:17 PM

Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 01:00 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85