PC Nerd
Members-
Posts
1,122 -
Joined
-
Last visited
Never
Everything posted by PC Nerd
-
so thats basically converting all the python code into php and executing it? - that doesnt seem right? is that what its doing? thanks
-
well its a shared host, so i probably wont be able to do much with the system function, because it looks liek it playing with all the directories on their server. assuming that my script: script.py is in teh same folder/directory that the php is running from, how would I use exec or shell_exec to run the python with arguments also - whats the difference between the two functions that you mentioned? Thanks for the speedy reply
-
About Large Data Volume Best Way To Deal With It
PC Nerd replied to MiCR0's topic in PHP Coding Help
hmmm, well if you could setup a cron job on your server, that exports your data as SQL - and emails it to you that might work. If however youll need that data to store and use continuely on the site, there will be a time, whether it be days or months, that youll need to upgrade your storage. there are a few fantastic hosts out there that are very reliable, and have a fantastic data storage limit. in the relm of GB ( and i did say reliable) - for only around 10-20$ a month. I wont mention them here, but a quick google search shoudl be able to find you a few to start with. Its really an issue of do you need that data on your server, or can you move it to your own harddrive daily, into another databse that you can still roam and query? gdlk -
Hi, Ive got a python script that used a file, and I want to build a PHP backend/frontend setup for my site - so that the python script can run on a file upload. Its a similar sort of thing to the onlien doc to pdf converters. The short of it: now to I run a python script, and send it 3 arguments? The longer version of my question: Im not sure how to do this, but I dont really want to have the user waiting for a longer period of time while the python script runs, so Im looking for a way to also run the python script, almost on another thread. I am on a shared host so i night have to live with the delay. basically Ill need to pass teh python script 3 variables, an input filename, an output filename, and a table name (it works with SQL). So - Im not sure exactly how to pass those arguments to python either? EDIT: python is installed on my server, I can manage all teh file writing and upload sort of stuff, its jsut the running of the python script that i dont know how to do. Thanks for any and all help.
-
JavaScript - change the actual event called with an element
PC Nerd replied to PC Nerd's topic in Javascript Help
ok, thanks Ive solved it by ensureing that the first list element is " --> " or " Please Select"... that way the onChaneg is always true. Thanks for the suggestion Ill be sure to try itout an play with it. -
*** YIPPE*** Thanks soo much for all your help. Barands solution was correct and is now working. All my resources simply say that the onlw way to do it is where the database field is inbetween the 2 variables.... which i knew sounded wrong but had no idea about how to adapt to my situation. Thanks also MadTechie - I think we were about to hit the nail on the head but Barand beat us. Thanks
-
Data: Start End (1) 1999 2005 (2) 2001 2003 (3) 1995 2008 (4) 2008 2008 now if i try teh following values: 2001: (1) (2) (3) 2000: (1) (3) 2004: (1) (3) 2008: (3) (4) so what Im trying to do is i have a variable. i want to return all records where that variable($YEAR) is in between the two given fields. ( Start is always smaller that End, and on occaision they will be the same as shown above.... Thanks for all the effore your going to. *** edit: Ill try your example Barand - that sounds about correct. Thanks
-
UPDATE table SET field = table.field+1 WHERE id=table.id someone will need to check this because its just a guess, however it should work for you. gdlk
-
if(!is_int($_GET['Price'])) { # This is what happens when the input isnt an integer. } also - try maybe a bit of JavaScript validation for the users end to save them entering thigns and continually submitting
-
*** the problem is that i also have records where the Year_Start is 1999 etc so therefore: 1999 <= 2004 = true and the same ( but revers incr numbers) for the Year_End Can you see my problem? Thanks
-
eg: Year_Start = 2001 Year_End = 2008 $YEAR = 2004 thats basically saying : where 2001 is greater that 2004 AND 2008 is less than 2004 that wouldnt work would it???? what im really looking for is an SQL solution similar to: where $YEAR > Year_Start AND $YEAR < Year_End however from my knowledge and resources that doesnt work. Thanks for the speedy reply.
-
Hi, Ive got a database that has 2 fields that i want to compare: Year_Start and Year_End. if i have a variable that stores a year, I want to return all teh records where my variable is in the range of Year_Start and Year_End. ie - I cant use the following, and I dont want to have to do it in PHP because of the scale of the database. SELECt * FROM `catalog` WHERE `Year_Start` < $YEAR ....... Ive been looking for a way to do it in SQL but i cant find a method to do it. Any suggestions of a SQL statement, or a very fast PHP work around woudl be fantastic ( its over 600 records, likely to grow reasonably rapidly). Thanks in advance.
-
Hi, Ive got a problem where if my AJAX only places one item in teh select list.. the onChange event doesnt work. becaus of this i want to have code similar to: if(array.length==1) { change the event called} i was thinking: selectobj.onChange=null; selectobj.onClick=setNextField(); from there i would do the same with each change so if an element decided it was longer that 1 element, it would change again. Is that possible, or is there a better way of doing it? Thanks for your help in advance.
-
strtotime("now <TIMEZONE?"); i think shodul work for you. gdlk
-
also: include($id.".txt"); that also works.
-
Im posting this to a) see if its the contents of my other post. and b) - to see if its just my post that isnt working..???
-
if your talking about having one window always on top - then youll have to install a program that helps to manage windows such as a taskbar manager. However you cna also tile your windows. etc. If you mean by comparing data using javascript between windows... then i beleive there is a way using the window root object in the DOM
-
Hi, Im looking for a few pointers about how to approach a small project I have. I want to have my spider run half hourly, or so - and i want it to login to my email.... using POP3 ( Autheticated etc). I then want it to read the first x characters from message and the subject and then email a copy of the abbreviated email to another email address, where it gets displayed elsewhere as an alert that i have new mail. Im remotely familiar with cURL, however more with teh wrappers than with the actual cURL interface etc. Is there anothe rmethod ti download teh unread emails??? Thanks
-
this is what it does. $val = ""; empty($val) would return true - so the statement is saying if its not empty. then if i go if(isset($val)), it checks to see if there is a variable called $val, therefore returning true. basically its changing to testing if the variabel is set - to if it is empty
-
ok. Thanks
-
How to make a value in the Database raise every minute
PC Nerd replied to feelay's topic in PHP Coding Help
hi.. soudns liek your writing a game - meanign youll ve getting a lot of database trafic. instead why not have a text file for the HP - and then hevery tiem someone reads it - check if the time is + 60 seconds - then write new values to it. eg have the file say: last_time: "timestamp" HP: 5; then jsut check to see if the timestamp is as above and then do the same. you could do the same through mySQL if you wanted. gdlk -
Hi - Im gettign the error below - and Ive never come accross this warnign message before. Im wondering how i can fix it, and what it is caused by? Thanks Warning: mysql_connect(): Can't connect to local MySQL server through socket '****/mysql.sock' (2) in ******/Database_link.inc on line 15 Can't connect to local MySQL server through socket '****/mysql.sock' (2) Thanks my connection code is: $host = "localhost"; $account = "****"; $password = "****"; $db_name = "****"; $DB_Server = mysql_connect($host, $account, $password) or die(mysql_error())
-
[SOLVED] Importing Data From Microsoft Excel into MySQL database
PC Nerd replied to PC Nerd's topic in PHP Coding Help
Thanks. Ill look into it. -
[SOLVED] Importing Data From Microsoft Excel into MySQL database
PC Nerd replied to PC Nerd's topic in PHP Coding Help
** bump **