I'd uninstall php first...I believe its rpm -e mod_php (or you can do rpm
-e `rpm -qa|grep php` and then I'd upgrade apache and PHP on your box for
security reasons. Read the installation section in the php manual at
www.php.net for details.
Adam
On Wed, 14 Aug 2002
/access_log and error_log
Adam
On Wed, 14 Aug 2002, Julio Cuz, Jr. wrote:
Hi--
I'm currently running 4.0.4pl1 on RedHat 7.0 and I want to upgrade to PHP
4.2.2is there anything special I have to do BEFORE or AFTER the
install? Or is it just a straight re-install of PHP
info on their ste
http://developer.apple.com/internet/macosx/php.html
Adam
Try using parentheses inside your sql:
Select * from table_name where (col1=1 OR col2=1) and col3=0
Select * from table_name where col1=1 OR (col2=1 and col3=0)
They make a big difference, also helps to indentify what you're selecting when you
come back to the sql later.
Adam
',
field3 = 'something3',
field4 = 'something4';
$result = mysql_query($sql);
Hope that answers your question.
Adam
it right.
If you want to use numbering for your records, create it dynamically when you display
the data.
Adam
--- Original Message ---
rite,
my primary key column (id) is set to auto_increment as usual which is very
handy. But when I delete a row, the auto_increment just keeps incrementing
This is friendlier, cleaner and faster way to return the results.
$chk = implode(, , $chk);
$sql = SELECT field1, field2 FROM tblName WHERE ID IN ($chk) ORDER BY ID;
this should bring back all the records within one resultset, which is easier
to manage
Adam
--
PHP Database Mailing List
$result = mssql_query($query) or die(mssql_get_last_message());
Adam Voigt
[EMAIL PROTECTED]
On Wed, 2002-07-24 at 19:48, Salve Tinkerworth wrote:
Does anyone have any good tips for error handling? I've tried different
methods to retrieve good error information from mssql_query but nothing
Could you give an example of what you are sending in as the date value
in an Insert/Update?
Adam Voigt
[EMAIL PROTECTED]
On Thu, 2002-07-25 at 08:45, [EMAIL PROTECTED] wrote:
has anyone had any expierence with the datetime field coming back from
MSSQL as someting along the lines of February
/en/ref.odbc.php
--
Adam Alkins
http://www.rasadam.com
--
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
;
}
}
//--
/SCRIPT
!-- and your html will be like this (obviously change your var names as
per your script --
A HREF=javascript:deleteRecord('?= $recordName ?','?=
$recordID ?');?= $recordName ?/A
HTH,
Adam.
Hi,
Here is what I wanted to achieve, I want to get a confirmation box pop
Study these two parts in the manual, and you will know how to do everything you've
mentioned (and more).
http://www.php.net/manual/en/ref.strings.php
http://www.php.net/manual/en/ref.array.php
Adam
to help.
Adam
Wrong list. This is for Databases.
Try the php-install list.
--
Adam Alkins
http://www.rasadam.com
--
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
$query = mysql_query(SELECT whatever FROM whatever;);
while($row = mysql_fetch_array($query))
$construct[] = $row[whatever];
That will give you an array (construct) with position 0 being the first
row, position 1 being the second row, and so on.
Adam Voigt
[EMAIL PROTECTED]
On Mon
selected 10 rows, it will return 10.
If you want to count all the rows in the table, its best to use the COUNT()
function
SELECT COUNT(*) FROM table
--
Adam Alkins
http://www.rasadam.com
--
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http
();
}
--
Adam Alkins
http://www.rasadam.com
--
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
= false, 1 = true;
{
echo Name was found in the database;
}
else
{
echo Name was NOT found in the database;
}
Hope that helps..
Adam
Hi there
I am having a problem querrying to my database.
I wish to check to see if a username is listed in the database so that
I can
if selecting multiple rows, use a loop
while($data = mysql_fetch_array())...
--
Adam Alkins
http://www.rasadam.com
--
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
in PHP?
I believe mssql_get_last_message() is what you want.
--
Adam Alkins
http://www.rasadam.com
--
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[3] = third
)
You can also have multidimensional arrays, but not associative arrays.
But you do have the 255 character limitation (can be a bummer).
Adam
Also, as far as limitations go, the following are considerations;
1. You can't pass an array using the querystring
2. Multiline
clear this up?
Yes. URL passed variables are access via the GET method. So page.php?foo=bar
is accessed by $_GET['foo']
--
Adam Alkins
http://www.rasadam.com
--
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
Good reading: http://www.php.net/manual/en/language.variables.predefined.php
--
Adam Alkins
http://www.rasadam.com
--
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
?var2=?= var2
?,theWindow,width=200,height=300);
adam
maybe this is more a javescripy problem...but its related to my php
code:
how can i open a new window with javacript and pass to it php
variables??
thanks guys alot.
Rehab M.Shouman
--
PHP Database Mailing List (http://www.php.net
Sorry if you are a newbie..
but if might help if you delete the records before you select them to display in
html
ie: put the delete query at the top of the page, just after this line:
require (templates/db_connect.php);
adam
. this will make a
comma-delimited string of all your selected ID numbers, and will be
available in $name_array
your choice
adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
() LIMIT 1
2. Get all of the ID numbers into an array and pick a random value, then
retrieve the rest of the details using the row ID you picked from the array.
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What you said (Mike) is mostly correct, although the GetSQLValueString()
function in Scott's code automatically puts the quotes around the values
if the datatype definition of text is passed to the function.
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http
the contents of
the second drop-down box.
There are a few examples around on the net - Google is your friend.
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Matt,
I think this might be the answer to your problem. It basically checks if
the string is an integer. I generally love the PHP automatic type
conversion, but sometimes it can trick ya :)
if (intval($val) == $val){
// integer stuff
} else {
// string stuff
}
Adam
(category_list_array[],categories,,multiple
size=10);
And voila... all is done...
Need any help... ask
Oh yeah, btw everyone else, I have emailed the lib.php file to Bob - if
you want a copy, email me.
Adam
lib.php.zip
Description: Zip archive
--
PHP Database Mailing List (http://www.php.net
must take account of this in your
code interacting with the server, but the data will be sync'd).
Adam Voigt
[EMAIL PROTECTED]
On Tue, 2002-06-18 at 08:47, Matt Babineau wrote:
Hi All:
I quickly skimmed the MySQL manual and didn't see any information on
clustering. Does MySQL have any support
could think of would be an application
gateway of some sort which will load balance properly to different IP's
while in your code you only point to one.
Adam Voigt
[EMAIL PROTECTED]
On Tue, 2002-06-18 at 09:12, Matt Babineau wrote:
Thanks for your response Adam!
Do you know if there is any
.
Adam
?php
/* Connecting, selecting database */
$link = mysql_connect(192.168.0.112, root, )
or die(Could not connect);
print Connected successfully;
mysql_select_db(dgdrivers) or die(Could not select database);
/* Performing SQL query */
$query = SELECT type
I think this is something like you would want...
Adam
SELECT users.id, username, MAX(stamp) as stamp, filename
FROM users, files
WHERE users.id = userid
GROUP BY username
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
is my table schema for the above query
Adam
CREATE TABLE tblCashflow (
ID bigint(20) NOT NULL auto_increment,
purchaseDate date default NULL,
categoryID_FK tinyint(4) default NULL,
itemName text,
itemPrice float default '0',
isEssential tinyint(4) default '0
add and delete things inside
the functions for your own setup.
Adam
/ DEFINE CONSTANTS /
// Connecting to a database
define( DB_SERVER , localhost ); // used for dbConnect()
define( DB_USERNAME , username ); // used for dbConnect()
define( DB_PASSWORD
This should be it (if I am understanding you correctly).
Adam
$strSQL = SELECT SUM(columnName) as sum FROM tblName;
$result = mysql_query($strSQL);
while ($row = mysql_fetch_array($result)){
$total = $row[sum];
}
Hi all,
Is there a way for me in PHP4
as much.
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
SELECT * FROM whatever ORDER BY id DESC;
Ofcourse if you want Ascending order, it would be ASC instead of DESC
Adam Voigt
[EMAIL PROTECTED]
On Tue, 09 Apr 2002 15:48:45 +0200, Lisi [EMAIL PROTECTED] wrote:
Each record in my table has a unique ID number generated by auto increment
each time
Oh, forget to include that if you only want that one record,
use the LIMIT 1 keyword as well.
Adam Voigt
[EMAIL PROTECTED]
P.S.: All of this is in the MySQL manual.
On Tue, 09 Apr 2002 15:48:45 +0200, Lisi [EMAIL PROTECTED] wrote:
Each record in my table has a unique ID number generated
ways to do certain things, and so
few ways to do other things. =)
Just Curious,
Adam Voigt
[EMAIL PROTECTED]
On Mon, 08 Apr 2002 13:41:46 +0900, Yasuo Ohgaki [EMAIL PROTECTED] wrote:
Hi,
I've added new PostgreSQL functions to CVS
language, and I certainly
don't want you to think me a ASP zealot because I don't program
in ASP or iHTML for that matter, I'm a pure PHP evangelist from
top to bottom.
Adam Voigt
[EMAIL PROTECTED]
On Mon, 08 Apr 2002 23:04:25 +0900, Yasuo Ohgaki [EMAIL PROTECTED] wrote:
Adam Voigt wrote:
think it's
without the
variables to make sure it works just even with straight static values?
Adam Voigt
[EMAIL PROTECTED]
On Tue, 2 Apr 2002 10:55:20 -0500, James Kupernik [EMAIL PROTECTED] wrote:
I'm trying to run a mail function .. the program is running, but I'm not
getting the email. Here is the code
as coming from [EMAIL PROTECTED], while
when they clicked the reply button, it would go to [EMAIL PROTECTED], the most useful
situation for these is when your server appends a nastry from address like
apache@localhost
or whatever from the webserver daemon.
Adam Voigt
[EMAIL PROTECTED]
On Tue, 2 Apr
to use both (its not that hard) and it will make life a lot easier
(and more interesting).
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Simple do these checks and you'll be sweet as a nut
Adam
?php
$sql = SELECT nickname FROM tblUsers WHERE nickname = '$nickname'';
$result = mysql_query($sql);
$sql = SELECT email FROM tblUsers WHERE email = '$email';
$result2 = mysql_query($sql);
if (mysql_num_rows($result
there...
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and if they are allowed to insert the record.
Adam.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
not hae single quotes around it...
adam
PHP cannot recognise javascript variables because javascript is
interpreted via the browser, and not the server (which php is). for php
to use javascript variables, you must post the variable to another page
using either a form or querystring.
Adam
script
c=document.forms[0
of the person logged in, you can
allow/disallow what they can edit depending on the ID. If you need
further help, contact me directly.
Adam.
Im making an address book using PHP and mySQL.
I want each user to have access only to his/hers adressinputs. Now Im
wondering how I gonna solve this, ofcourse
?;
/script
javascript - php:
script language=JavaScript
// this is probably wrong javascript syntax, but you get the idea
location.href = thing.php?q=first+onep=second+one;
/script
Adam
i know it has nothing to do with php but i'm stuck:)
i have this url:
http://localhost/auction/seller
: )
Adam
You can use it like so...
PHP Script (of course, you must either have the function on the same
page or include() it like so):
?php include('extractPairs.php');
header(Content-Type: text/plain);
$strText = Name1=Value1 \n Name2 = Value 2\nName 3 =Value 3;
$arrPairs = extractPairs
If the variable $SCRIPT_NAME does not suit your needs, try the other
environment variables here:
http://www.php.net/manual/en/language.variables.predefined.php
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to be an easier way.
Adam.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
worried about...
any questions about the code?? just ask...
Adam
I have a special set of information retrieved from a while loop that I would
like a person to be able to edit and send back into a MySQL table.
I know all of the basic MySQL commands for doing such, but the PHP side to
get the input
variables with the same name.
See if that works, and if it doesn't have a look at this...
http://www.php.net/manual/en/language.variables.predefined.php
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
= posts.topic_id
ORDER BY posts.lastUpdated DESC LIMIT 10;
Also, this would allow for extra things in the future, such as a page
showing all updates in a certain day, or within last 3 days, or something
like that.
Hope this helps.
Adam
-Original Message-
From: KingZeus [mailto:[EMAIL
I think this is what you're getting at:
select name=artistID
option value=?= $row[ID] ??= $row[ArtistName] ?/option
/select
or something like that so it would look like (in HTML)
select name=artistID
option value=23Artist's Name First in list/option
option value=44Artist's Name second in
, etc. this is would be good if you were storing addresses
(like downloadable things, eg PDFs or scripts, etc) cause then it really
is a link MANAGEMENT system, and not just a link stat counter
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
You missed the SET parameter in your query... example is below...
$query = INSERT INTO Canidate SET (FirstName, LastName, Indus...
Adam
-Original Message-
From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 11:06 AM
To: [EMAIL PROTECTED]
Subject: Re: FIle
command to make sure there are no duplicates. Look in the mySQL
documentation (www.mysql.com) to find the correct command.
Adam
-Original Message-
From: Janet Valade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 1:24 PM
To: [EMAIL PROTECTED]
Subject: ensuring unique field value
A few things to check:
1. You have a connection to the database (I'm assuming you do).
2. mysql_query() is a php function so you should not put a dollar sign
before it (indicating it is a variable. If you want mysql_query() to return
a variable, do something like this: $result =
an
existing session variable.
Also, in logic (I haven't tested though), your condition for your 'if'
statement ($qty == $qty) will always evaluate to true.
Adam
-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 19, 2002 3:17 AM
To: php List
Subject
is what makes it work. For better definition of what these
things do, look in the php manual (Chapter 3. Configuration).
Hope this helps,
Adam.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact
PROTECTED]
my sendmail_path is still the same as default... but I was just thinking
that PHP would use my smtp server(ifunk.dyndns.org)
Can someone slap me in the face if I'm misunderstanding something, or
help me if you can.
Thanks,
Adam.
--
PHP Database Mailing List (http://www.php.net
!--
function start(){
var something = new Array();
?php
for ($i=0;$icount($array);$i++){
echo javascript array stuff -- $array[$i];
}
?
// now the other javascript code (additional lists etc)
}
and then thats it! (well, sorta, but you get the jist)
Adam
as expected
mysql_query($sql);
}
Any help would be appreciated.
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
i have a date in my mysql database in the format of 20011201 how do I output
that to show for example 01 December 2001 or something similar?
Cheers
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Yes, I had the right code just was missing the mysql_data_seek. Thanks for
the help.
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 1:09 PM
To: 'Adam Douglas'; PHP-DB (mailing list) (E-mail)
Subject: RE: [PHP-DB] Using A Query Results
Thanks for the help. I had all the code right just had to add the
mysql_data_seek. Wasn't aware it operated in this manner.
-Original Message-
From: Peter Lovatt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 3:41 PM
To: Adam Douglas; PHP-DB (mailing list) (E-mail); PHP
I have an instance where I have to query my MySQL database and then
use the multiple row results to create multiple pull down menus on a web
page. My problem is how can I take the results of the query and use them
more the once to create pull down menus? I've always used a while look to
Ok I've finally gotten MySQL 3.23.37 installed and operating. Thanks to
all that helped! The problem I'm now experiencing is when I try to
interface with MySQL via PHP. MySQL seems to work fine by logging into
MySQL directly and through a MySQL GUI Client. I get the following error...
What exactly does the error 'REG_EMPTY' mean in PHP?
--
-Adam Lundrigan
CEO, VPU
http://www.vpu-virtual.com/
ICQ # 73617446
[EMAIL PROTECTED]
that the same question doesn't appear twice. The questions need to
appear in a random order each time the script is loaded. It sounds simple enough, but
i just can't seem to get it to work.
Any suggestions??
Thanks in advance,
-Adam Lundrigan
CEO, VPU
http://www.vpu-virtual.com/
ICQ # 73617446
Anybody know of a good installation description for connection PHP on linux
to MS SQL on a 2000 machine? I've been through about 3 so far and none of
them have worked.
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
.
What am I doing wrong?
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
in PHPbut why doesn't the connect work if
it is included?
-Adam Lundrigan
CEO, VPU
http://www.vpu-virtual.com/
ICQ # 73617446
[EMAIL PROTECTED]
mysql in a php script:
Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (111) in lib.inc.php3 on line 97
Error
I'm sure that mysql server is running.
Greets,
Adam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e
that the date is stored
in.
To get more info on the DATE_FORMAT function, check out the MySQL online
manual.
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Dat
e_and_time_functions
Regards,
Adam Younce
[EMAIL PROTECTED]
- Original Message -
From: "Ben C
201 - 281 of 281 matches
Mail list logo