Jump to content

the_oliver

Members
  • Posts

    364
  • Joined

  • Last visited

    Never

Everything posted by the_oliver

  1. could simply run it as four searches.  Serch artist first, then title etc.... Have each search add on to the previous results in a table/list/whatever..... Thats the simplest way, but if your pulling large amouts form your table, or have large numbers of quieryes running syimoltainusly it could slow things down.  Depending on what database your using it would have to be quite a lot though! (maybe if its large you should consider postgreSQL?) Alternitivly asign a number to each (artist = 1, title = 2 etc), and have your database sort its table numericaly. Hope this helps
  2. Hello. Is there a way i can use a php script to edit lines in a .cfg file? I would like it to do something like: show what the file says, then optionaly change line [i]a number[/i] from [i]nost type    ping_check[/i] to [i]host do      http_check[/i] (or whatever the user selects) Also could this be done if the .cfg file is on a diffrent server? Thanks
  3. not distructive, all the files and servies are mine!  What about on the same server though?
  4. Grate!  Couldnt agree more about the previous 'does not use that annoying frame' coment!
  5. Looks good, but maybe the top bar could be a littls smaller?  Quite intrusive!
  6. If you want to run from a single directory then you simply change this in apache's .conf file. If however you wish to run from multiple directorys one option would be to set up virtual hosting.
  7. Simplest way to deal with access would be to use a .htaccess file.  This is simply place in the directory you wish to be secure.  The webserver should automatical search a directory for one of these, and on finding one use it to authenticate users.  You should also consider including a robots.txt file (google this one)  so that you dont find the text displayed under a link in a search engin.  Do they not give you a controle pannle to do this? As to the "Web page has expired" thing you should take this up with you hosting company.
  8. You can always specify the port by simply adding it onto the end of a url e.g. www.myaddress.com:80 Sounds like to resolve the problem propaly however you will need access to the .cong or .ini (most likly a typo!).
  9. If your looking for simplisity with your domin i would recomend www.telivo.com There fast and reliable, and once you have regesterd then you can simply alter the DNS settings so they point to your IP address.  Only problem with them is that they dont alow the addition of many A-records if you find your server collection expanding. What OS are you running Apache on?  Can you explain this localhost thing a little more clearly please? are you trying to get it using your local browser?  If linux is the service running happily and have you cheacked your firewall/forwording rules?
  10. Is this returning from a calculation or a database?  If database its best to do this at time of insertion buy having your submision insist on it.  Alternitivly some database can do this server side. Perhaps if its returning it from a calculation on the page it could be achived by multiplying it by '1.00' as this won't change the figure?  Not sure about this one though.
  11. Hi, I would do this by adding an aditional coloum into your database table, for the pourpous of identifying each entrie, and seting this to automaticaly incrament every time a new row is added. (what database type are you using?)  This garanties you a unique id number for each entrie.  you can then add a new row into the database containing the data you have already have pulled out, the only diffrence being the id it is assgned.  Your can then get this new ID number by serching for SELECT id_coloums_name FROM table_name WHERE coloum_of_origional_data ILIKE 'data_on_page' (example is pgSQL but simialar format for most).  This will of course give you more then one option, but you can ignor the one of the origional data. (store this in a variable when you make your first poll for the origional data).  Then the changes the made can be updated using this ID number as a refrance point in the table. . . . In a less long winded way: 1)  re-insert the data, using auto_incriment id. 2)  get new id number 3)  Update changes using the new id number The only problem with this is that if you have a large table adding to it will make poll's slowly slower.  Can get round this by having a second table to store the altered dater/'save as' versions in. Hope i havent discribed this to much like mud!  There may well be better ways.
  12. Hello, Is there a way that i can create a php form to reed in data from a .cfg file, prefrably on a diffrent server, thats not in the web directory, and then alow the data to be altered and saved back into the file? The file would have an area looking as follows. [quote]# define service{         host_name                    Changable by form              is_volatile                        Changable by form         check_period                    Changable by form         }[/quote] Also could i use php to create or remove these files? Thanks
  13. :) knew it would be simple! Thanks
  14. Hi all! Having a problem trying to poll a postgresql database. Im running the code below, and get the following two error: (wrong line numbers!) Warning: pg_query(): supplied argument is not a valid PostgreSQL link resource in /var/www/html/helm-associates.net/parts/common.php on line 29 Warning: pg_num_rows(): supplied argument is not a valid PostgreSQL result resource in /var/www/html/helm-associates.net/parts/common.php on line 31 Code: function is_auth_approved()         {         $ip=$_SERVER['REMOTE_ADDR'];         $query = "SELECT ip FROM member WHERE session = '".session_id()."'";         $result = pg_query($pg_connection,  $query);         $count_rows = pg_num_rows($result);         if ($count_rows > 0)                 {                 for ($i=0; $i<$count_rows; $i++)                         {                         $row = pg_fetch_row($result, $i);                         if ( $row[0] == $ip )                                 {                                 return "1";                                 }                         else                                 {                                 return "0";                                 }                         }                 }                 else                 {                 return "0";                 } } pg_close($pg_connection); With connection details in a nother file as follows: //FOR CONNECTION TO POSTGRESQL DATABASE $pg_host = "hostdetails"; $pg_user = "username"; $pg_pass = "password"; $pg_db  = "helm_associates"; $pg_connection = pg_connect ("host=$pg_host dbname=$pg_db user=$pg_user password=$pg_pass");         if (!$pg_connection)           {           die("Could not open connection to database server $pg_host");           } Sure its just something simple ive missed but not sure what! Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.