Hi Drj,
Please excuse my ignorance, but could you clarify how to construct the sql query. Currnetly I have
$userquery="select * from users where (username = '$login' and password = '$pass')";
as my mysql query so it just queries for a valid login and password combination. I need it also...
I have a table on my mysql database which hold an expiry date in mysql's date format. I need to compare it to the current server date to check if a username has expired.
I have set date is php to the same format as the mysql date using
$today = date("Y-m-d");
I am trying to check the system...
This is probably really easy but as I am new to asp I was wondering if anyone could help.
I have an access dbase that holds usernames and passwords and an expiry date.
I need to compare the expiry date with the current date and if it is later than the current date it will allow access (if the...
What can I say,
Absolutely brilliant DRJ478. Works like a dream. Well it's certainly been a learning day today!
Many many thanks, you have really dug me out of a hole!!
Richard
No problems,
I will have to post the data as an image on a site as it won't copy pate properly. I will label it properly for you .
Look at ictechinformatique.com/cedit.jpg for the pic.
The data will be input if I use phpmyadmin, but not from the script below.(I have removed connection...
That's what I thought too, but for some reason it doesn't want to take the data on the lines with the CR/LF on them.
No idea why, but that's whats happening. It's not actually important to have the CR/LF's there (infact may be better no too) so I'm definitely looking for a way to strip them...
Interesting,
I got DRJ478's solution working really easily - Except in some of my sql statements there seems to be a Carriage return (looking at it in crimson editor it has a small square symbol).
Whilst if I execute the script file through php myadmin everything is fine, when I read the file...
Thanks a million.
I will get to it straight away. Fortunately I only have insert statements in the sql.
I know that the command line stuff would be nice and easy, but like I said I need to do various other bits and pieces too so thought it'd be better all in one file.
Thanks again,
Richard
I know that the command line would be best, but I need to run a cron job that inserts the data into a database and then a few other bits and pieces. I'm best with php rather than bash etc. so wanted to do it in PHP and call it from cron.
The script needs to work as a cronjob (the php does that on the source server to get the mysql data entries) then it needs to ftp to the destination server and run. I was going to have a php cron job (or bash) that processes the sql data file.
Problem identified (not resolved though!!)
My host doen't allow incoming or outgoing external connections to mysql. Probably on the firewall as I have opened all access hosts for the database but doesn't make a difference. Can't access the database from outside or connect to a remote...
Hi,
I want to export some data from one database to another but unfortunately my host won't allow inbound or outbound connections so I can't connect to the remote host.
What I thought I'd do to get around the problem is to write the mysql commands to a text file which can then be run on the...
Almost,
It actually takes data from one database then connects to a different one (different host) and updates 3 tables. Unfortunately, the ID of the main listings table is not the ID of the other two tables (they both have a different field that relates to the original ID); So, I have three...
Unfortunately the properties that are inserted by the integration script have to be be deleted every night and new ones are then automatically inserted. Also, I need to know what the ID is as photos and other info need to reference them. Because of the way the main script works I have to give...
Hi,
I have a script that integrates a set of data from one database with another ro display real estate listings. The database uses an autoincrement ID field to store the listings.
At the moment, my integration script sets the ID number a lot higher that the last record so as to not intefere...
Hi, I need to access a remote mysql host from my server. All host permissions have been set but the server refuses to connect. I can use a different one and there is no problem. It just seems to be from one specific host that I can't get access.
Richard
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.