• 0

database and php question


Question

Could anyone of you loverly people direct me to a tutorial (written so a thicko like me can understand it) about ODBC databases being accessed from a PHP script.

I'll explain. I have a PHP script that outputs a form to a .txt or .csv file. Now then, my webhosting is on a Windows 2003 server and therfore doesnt allow file permissions to be set (i.e CHMOD) so I can't simply have a file that the script updates by itself. However I have enabled the database engine on the hosting to allow a .txt or .csv file in a specific location (......\_private\myfolder\myfile.txt).

OK with me so far? I'n new at this so bare with me.

I need to know what i do to get the PHP script to output to that particular place. I think its more like a database than a file, but I don't really understand.

Any help welcomed.

P.S. the help, FAQ's and forum on my hosting are crap. and don't mention anything.

Link to comment
https://www.neowin.net/forum/topic/326182-database-and-php-question/
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Even though Windows doesn't support CHMOD, you can do (almost) the same thing through user permissions. Which, of course, would require access to the system. I used to run a site built on ASP that needed to access an Access database - and this file was placed directly into the web path. Though using permissions, the host was able to allow IIS to access the file but not the web user. I can't remember any more than that, but maybe that'll help you.

  • 0

thanks for the reply's but not exactly what I wa looking for. I really want a tutorial on how to use the database aspect of the website. As I said I have enable the ODBC database engine on my hosting to allow .txt or .csv files in a specific folder.

Any help appreciated. I know absolutely nothing about databases.

  • 0

ODBC is for connecting to a database. I believe there are ODBC drivers for dealing with .csv or some delimited .txt file and that is what you are talking about when you say ODBC being enabled on your hosting (though I'm still kinda unclear). That being said, ODBC wasn't made for dealing with delimited text files, it was made for dealing with relational databases.

Here is a tutorial on how to use ODBC to work on a Microsoft Access file through php:

Microsoft Access Database ODBC and PHP on phpfreaks.com

Interfacing with the text file is probably very similar, but I'm not sure how you send a text file a SQL string. Look up the specifics for whatever ODBC driver you are using.

-nic

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • People yearn for the good old days of IRC and truly open Internet, yet are dismissive of modern solutions like ActivityPub (which Mastodon pioneered) and Matrix. Make it make sense.
    • AI judges learn new tricks to fact-check and code better by Paul Hill Image via Pixabay AI researchers and developers are increasingly turning to large language models (LLMs) to evaluate the responses of other LLMs in a process known as “LLM-as-a-judge”. Unfortunately, the quality of these evaluations degrades on complex tasks like long-form factual checking, advanced coding, and math problems. Now, a new research paper published by researchers from the University of Cambridge and Apple outlines a new system that augments AI judges with external validation tools to improve their judgment quality. This system aims to overcome limitations found in both human and AI annotation. Humans face challenges and biases due to time limits, fatigue, and being influenced by writing style over factual accuracy while AI struggles with the aforementioned complex tasks. The Evaluation Agent that the researchers created is agentic so it can assess the response to determine if external tools are needed and utilizes the correct tools. For each evaluation, three main steps are passed through: initial domain assessment, tool usage, and a final decision. The fact-checking tool uses web search to verify atomic facts within a response; code execution leverages OpenAI’s code interpreter to run and verify code correctness; and math checker is a specialized version of the code execution tool for validating mathematical and arithmetic operations. If none of the tools are found to be useful for making judgments, the baseline LLM annotator is used to avoid unnecessary processing and potential performance regression on simple tasks. The system delivered notable improvements in long-form factual checking, with significant increases in agreement with ground-truth annotations across various baselines. In coding tasks, the agent-based approach significantly improved performance across all baselines. For challenging math tasks, the agents improved performance over some baselines, but not all, and overall agreement remained relatively low at around 56%. Notably, the researchers found that in long-form factual responses, the agent’s agreement with ground-truth was higher than that of human annotators. This framework is extensible, so in the future, other tools could be integrated to further improve LLM evaluation systems. The code for the framework will be made open source on Apple’s GitHub, but it isn’t up yet.
    • https://www.neowin.net/news/tags/mastodon/ In short: Federated Twitter (X)
    • Keep in mind it was purchased by an advertising company. I use SearxNG.
    • I am using Waterfox Private Search now that I started using the Waterfox browser on my PC and Android. Both work great* search waterfox net with full stops in between. * I have an issue where making comments on articles on various websites is difficult with Waterfox on Android as it randomly adds spaces and doubles up on text.
  • Recent Achievements

    • Collaborator
      fernan99 earned a badge
      Collaborator
    • Collaborator
      MikeK13 earned a badge
      Collaborator
    • One Month Later
      Alexander 001 earned a badge
      One Month Later
    • One Month Later
      Antonio Barboza earned a badge
      One Month Later
    • Week One Done
      Antonio Barboza earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      584
    2. 2
      ATLien_0
      218
    3. 3
      Michael Scrip
      170
    4. 4
      Xenon
      136
    5. 5
      +FloatingFatMan
      123
  • Tell a friend

    Love Neowin? Tell a friend!