| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | 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 |
| |
| | #2 (permalink) |
| Senior Member | 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 |
| |
| | #4 (permalink) |
| Senior Member | 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 |
| |
| | #5 (permalink) |
| NamePros Regular | 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"> Results for City --> <?= $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"> <?= $name ?> <?= $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"> <? } ?> </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(); ?> <?= $paging->clPaging_getPages(); ?> <?= $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 |
| |
| | #6 (permalink) |
| Senior Member | 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 |
| |
![]() |
| 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 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 |