Re: [PHP-DB] Slow access Apache + PHP + MySQL

2005-03-29 Thread Jennifer Goodie
-- Original message -- From: Andre Matos [EMAIL PROTECTED] Now, we are using MySQL version 4.1.9 with Apache 2.0.52 and PHP 4.3.10, all compiled and running on a Linux Fedora X86_64. What MPM is Apache using? The threaded ones are not recommended. I start to

Re: [PHP-DB] Using an array(-ish) in SQL queries

2004-11-02 Thread Jennifer Goodie
-- Original message -- From: -{ Rene Brehmer }- [EMAIL PROTECTED] Task at hand: deleting or selecting (same difference) several numbers of records using only 1 query. My first version simply looped through all the ticked off IDs and ran a single query for

Re: [PHP-DB] parse error in php backend sqlite

2004-10-20 Thread Jennifer Goodie
- Original message from Aravalli Sai : -- but when i run this code on browser it is giving an error ... Parse error: parse error in /home/saravall/.HTML/inv.php on line 63 It would be helpful if you said what the parse error is and which line is 63.

Re: [PHP-DB] rand()

2004-09-29 Thread Jennifer Goodie
-- Original message from blackwater dev : -- select * from clients order by RAND() THe query runs fine on my local server but when I run it on my hosts server, it works ok if there is only one record in the db but then there is more than one...I get this error:

Re: [PHP-DB] pass by reference

2003-10-09 Thread Jennifer Goodie
How do you pass by reference? I tried $var = myFunction($var1, $var2); but it gave me a warning saying that pass by reference is depreciated Call time pass by refrence is depreciated you should read the manual to see how it should be done.

Re: [PHP-DB] Getting ODBC openlink 37000 in odbc_do($conn,$sql) butodbc_tables($conn) works? Help!

2003-10-02 Thread Jennifer Goodie
But when I try $sql=select * form tblJobStatus; $results = odbc_do($conn,$sql) or die(p captured .odbc_errormsg()); I get Warning : odbc_do(): SQL error: [OpenLink][ODBC][Driver]Syntax error or access, SQL state 37000 in SQLExecDirect in /Library/WebServer/Documents/tests/odbc.php

RE: [PHP-DB] mysql field not resolving comaparison condition for zip code locator

2003-09-23 Thread Jennifer Goodie
I am having trouble implementing a zip code locator program. All of the functions work correctly but the $sql variable. The problem occurs by using the latitude argument as a comparison. The first latitude argument works but when the second latitude argument is added the query returns no

RE: [PHP-DB] Passing variables between html forms and updating sql table

2003-09-17 Thread Jennifer Goodie
I need a secure way of updating mysql on the website, phpadmin is not secure enough [snip] $MySQLLink = mysql_pconnect (davecp4, root, ) or die(Could not attach to database. Please try later or contact [EMAIL PROTECTED]); Please tell me you just took the password out of that for

RE: [PHP-DB] MYSQL Table Dump

2003-09-10 Thread Jennifer Goodie
Is there any way *from the command line* to get a dump of a mysql table and have it saved to a local file, instead of standard output from running mysqldump --help -r, --result-file=... Direct output to a given file. This option should be used in MSDOS, because it

RE: [PHP-DB] Simple Referrer

2003-08-27 Thread Jennifer Goodie
Hi. This seems like it should be simple. I've had no problem doing this in other languages, but can find no reference to this function in the PHP manual. How can I get PHP to return the referring URL? Depends on your PHP version and webserver install. In most cases $_SERVER['HTTP_REFERER']

RE: [PHP-DB] Ifs, ands, or buts

2003-08-27 Thread Jennifer Goodie
Lets say I wanted to check a bunch of fields to make sure they weren't empty. I can check one field by saying: if ($field1) { echo Field 1 is not empty; } I'd use empty() since certain values would cause your if to evalute to false http://www.php.net/manual/en/function.empty.php

RE: [PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread Jennifer Goodie
How do I avoid the problem in the subject hereto? SELECT query uses variable in the WHERE clause. Fails on the following query: SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A HKA 3902 #3708_JD's AE Exp' AND ... Escape it. SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A HKA

RE: [PHP-DB] How to insert date into date field

2003-08-26 Thread Jennifer Goodie
I have a date that is formatted in the following way day(00-31)/Mon(Jan-Dec)/year(2003):hour(00-23):minute(00-59):sec(00-59) I want to load this into mysql table (date column) In oracle I can just use the to_date function but all I find about MYSQL seems to want the date in a specific

RE: [PHP-DB] file upload security issue

2003-08-14 Thread Jennifer Goodie
I try to learn file uploading in PHP. I've successfully uploaded a file onto my server. I use move_uploaded_file(tmp_dir/tmp_filename, destination_dir/filename) to move the temp file. The thing is that I have to do a chmod 777 destination_dir in order to move the file. Is this bad for

RE: [PHP-DB] Date format problem

2003-08-14 Thread Jennifer Goodie
I have a field in my mysql db wich is a timestamp with the format mmddhhmmss and I would like to display it like: dd/mm/ http://www.mysql.com/doc/en/Date_and_time_functions.html#IDX1333 SELECT DATE_FORMAT(timestamp_col_name, '%d/%m/%Y') FROM table_name -- PHP Database

RE: [PHP-DB] dual-processors and php

2003-08-05 Thread Jennifer Goodie
My php scripts that work well on single-processor machines will not work when I put them on a dual-processor server running RedHat 8.0. Is this a matter of settings in php or in the mysql database that provides the data? I can connect to the database through the php.include scripts, but then

RE: [PHP-DB] Getting a date in number form

2003-07-15 Thread Jennifer Goodie
I need to get the month in a number format; July =7. Right now it is returning the string: July. This is what I am doing. $today = getdate(); $month = $today['month']; $mday = $today['mday']; $year = $today['year']; What can I do to get the number instead of the word?

RE: [PHP-DB] generating sequence without AUTO_INCREMENT

2003-06-26 Thread Jennifer Goodie
You could you do MAX(issue_number)+1 where YEAR(date) = Year(NOW()) to get next issue number for the current year, but if you had 2 people entering issues at the same time, it wouldn't work so well. Just trying to give you a starting point because it seems like you haven't really gotten an answer

RE: [PHP-DB] problem witd freetds

2003-06-17 Thread Jennifer Goodie
Parse error: parse error in /usr/local/www/data.default/test.php ] The parser is complaining about this line $numero= mssql_connect(130.102.1.88 sa , ); Try putting a comma between your arguments $numero= mssql_connect(130.102.1.88, sa, ); -- PHP Database Mailing List

RE: [PHP-DB] MD5 hash problem

2003-05-31 Thread Jennifer Goodie
For every password that I store in the database I have found it is the same string of characters no matter what the original $password is. That is because you have single quotes around your variable so it is not being expanded, so everytime it is the MD5 of the same thing, the string $password.

RE: [PHP-DB] connection pooling

2003-05-29 Thread Jennifer Goodie
Did you read the manual page? http://us4.php.net/manual/en/function.mysql-pconnect.php [quote]First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, username and password. If one is found, an identifier for it will be returned

RE: [PHP-DB] Permission Denied; Upload

2003-04-04 Thread Jennifer Goodie
Good job posting your username, password and server IP. I just logged into your database. Change your password immediately. -Original Message- From: John [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 10:12 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Permission Denied;

RE: [PHP-DB] Re: Permission Denied; Upload

2003-04-04 Thread Jennifer Goodie
You should not make the directory world writeable, that is a security risk. You should chown it to the user the webserver runs as and make sure it is owner writeable. As a side note, a directory that is 666 is not traversable as it is missing the execution bit and you need to execute to get into

RE: [PHP-DB] Can't Insert more than 1 record

2003-04-03 Thread Jennifer Goodie
Not without looking at your queries and code. Posting those might make it easier for people to answer your question. I could make a lot of guesses though. First guess is your query is incorrect. -Original Message- From: Keven Jones [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03,

RE: [PHP-DB] using a variable as values in an array

2003-03-31 Thread Jennifer Goodie
Instead of building a string in your loop do the assignment in the loop I have no idea what is being pulled from where, so I can't really give a good example -Original Message- From: Charles Kline [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 1:25 PM To: [EMAIL PROTECTED]

RE: [PHP-DB] using a variable as values in an array

2003-03-31 Thread Jennifer Goodie
line up exactly with what you had in mind, but I'm confident you can play with it to get what you want. -Original Message- From: Charles Kline [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 1:49 PM To: Jennifer Goodie Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] using a variable

RE: [PHP-DB] PHP mail() question?

2003-03-31 Thread Jennifer Goodie
mail() will not run queries, you need to look at the php manual for the set of functions for the database type you plan on using and execute the database stuff in your script and pass the formatted results in the appropriate argument of the mail function. ie $con = mysql_connect($host,

RE: [PHP-DB] mail()

2003-03-31 Thread Jennifer Goodie
This is not so much a database question. The answer is yes, it can be. You can read the documentation to find out how. http://www.php.net/manual/en/function.mail.php A quick example is: ?php $body = ''; foreach ($_POST as $key= $val){ $body .= $key = $val\n; } mail ($address, Form

RE: [PHP-DB] Sharing variable values among PHP files

2003-03-31 Thread Jennifer Goodie
You could set a cookie containing the value on the first page and access it on the others. -Original Message- From: Alexa Kirk [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 6:35 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [PHP-DB] Sharing variable values among

RE: [PHP-DB] Putting a string into a variable.

2003-03-28 Thread Jennifer Goodie
The part where $i is never equal to 1 might be the problem. You might want to try incrementing your sentinel when using loops. -Original Message- From: Info_Best-IT [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 11:13 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Putting a string

RE: [PHP-DB] Connection issues with pgsql?

2003-03-28 Thread Jennifer Goodie
Check the documentation on pg_query. http://www.php.net/manual/en/function.pg-query.php It expects the link identifier as the first argument and the query as the second. Switch your arguments and you might have some luck. The manual is always a great place to look for answers to things like