-- 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
-- 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
- 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.
-- 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:
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.
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
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
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
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
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']
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
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
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
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
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
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
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?
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
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
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.
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
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;
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
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,
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]
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
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,
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
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
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
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
31 matches
Mail list logo