I have created a user login/registration page. As of now I am
using a MySQL database to store the info of the user. To validate
the user I also have the password stored in the same DB. I was
wondering if there is a way that I can store the password in the DB
so that it is encrypted or
I had this problem a while ago, when you try to create the second
connection
to the database with the same login credentials, i.e username and
password.
If mysql / php detect there is a connection already established
with those
details it will return that specfic resouce and not create an
I am working on an application that requires me to connect to two
MySQL databases both hosted on the same server.
I have an existing set of class files I created to handle the db
connection to the main database. To connect to the second database,
I duplicated my db class files and renamed
Seriously, how many times are you going to send this email to the
list? I've seen it at least 5 times now in the past day, all the same
email under slightly different FROM and subjects. Send an email once.
If someone can answer, they will.
On Sep 28, 2005, at 10:18 AM, Hal McFarlane wrote:
How can I automatically forward to an external URL using PHP?
header('Location: http://espn.go.com');
exit;
Larry
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there any values to this function? I'm looking over some code
where this is a done a bunch of time and I don't see any value to
it. Maybe I'm naive about the internals but...
I'm not certain as to what exactly you are asking, but prior to PHP
4.1, I believe (possibly 4.2),
I'm trying to execute multiple queries using mysql_query() function
and I'm getting an error to check SQL syntax.
My PHP code looks like:
You cannot execute multiple queries at once using mysql_query(). If you
are using PHP 5.x and MySQL 4.1.x, there are new functions, one of
which does
Why does this NOT work?
UPDATE tipping SET score = 3 WHERE round1.game1 = H
AND tipping.username = jerry;
For starters, you should quote strings in a query. There may also be a
problem with the round1 reference.
Larry
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
I am looking to do the following w/ MySQL and PHP. Have 1 query that
gets
results, then use those results in another query:
$l = 2;
$result1 = (SELECT * FROM Drivers WHERE League = $l);
$result2 = mysql_query(SELECT DriverID, Driver, CarNbr FROM Drivers
LEFT
JOIN $LeagueList ON
When I submit my forms, if any textfield contains a ' the result comes
back
with /'
Is there anyway of stopping this?
Yes, either:
- turn off Magic Quotes GPC
or
- use stripslashes()
Larry
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have the auto_increment on one of my variables. During the past few
days
I have been doing testing on a live database and created several test
records which I now have deleted from my table. Is there any way of
setting
the auto_increment value to match the last correct number? Ron
You don't
Mac users, please forgive such a Windows-centric question, but I need
your help. And you can educate me in the process. I am helping a
student of mine set up a development environment with php, mysql, and
a webserver, and she uses a Mac. Are there any installation issues
unique to mac that I
$thing = [EMAIL PROTECTED];
$query = SELECT id, email, familyname FROM members WHERE
email=$thing;
You need to quote non-numeric values in SQL. It should be
$query = SELECT id, email, familyname FROM members WHERE
email=''$thing';
Also, you don't really need to select the email value since you
I have a form to insert customer data into a table. The form goes to
php
page to input data to db hen uses header to go to a final page
displaying customer's information.
Is there a way to get the ID (custid PK UNIQUE AUTO_INCREMENT) from
mysql after INSERT then pass to final page using urlencode
My division at State is trying to get PHP 5.0 approved for use by
developers
in the Department, and the Powers That Be are requesting evidence that
other
Federal agencies/military are using PHP, and the extent of it's use.
Anybody have a clue about this? I sure would appreciate some help!
I've
Here is my code I keep on getting a Resource id #2 ..whatever
that
meansany help would be appreciated!
$music = mysql_query (Select * from $db_table ORDER BY RAND() Limit
1);
if(!$music) die(Query Failed.);
while($row = mysql_fetch_row($music))
print $music;
}
This is because
I'm using $row = mysql_fetch_object and I can reference column names
by $row-name but how do I reference a pseudo column (that I make,
like substring( name from 1 ))?
Use an alias in your query:
SELECT column, DATE_FORMAT('%m', date_column) AS d FROM table
...
$row-d
Larry
--
PHP Database
Can any of you guide me how to do auto increament in a field?
I think there is one datatype for auto increament.
But I dont know how to do it ?
I'd start by reading the manual and documentation for the database
application being used. But, generally, auto incremented fields are
primary keys,
But i received Call to undefined function mysql_connect() on line 5
Can anyone help me?
Your PHP installation apparently does not support MySQL. You can
confirm this by running a phpinfo() script. You may need to
reinstall/recompile PHP.
Larry
--
PHP Database Mailing List (http://www.php.net/)
Online I could see everything, and the pages gave the appearance of
working,
however when I went into the DB using PHPMYADMIN to check the status
of the
new data entered, all I found was blank rows ( for the new data since
the
rebuild, all the old data was there) There were the correct number
Is this function, password() available at PHP Ander Windows?
I get an undefinied function error message!
There is no PASSWORD() function in PHP. There is, however, a PASSWORD()
function in MySQL and other database applications.
Larry
PS It looks like you hijacked someone else's thread, which you
I have these tables.
Users ( id,name,etc )
Coments : ( id , comment )
How do I do this kind of query:
I thought in one thing like this but I cant figure it out.
Example: Select * from users order by id desc in (select count (id)
from
comments)
Expected result:
List of users:
* User1
See
Is there a way that after a execution of a Login script and validation
of login from a MySql database to automatically redirected to run
another script ?
Use PHP's header() function. See the manual for syntax.
Larry
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
I have this data (eg.) ..big fat buddy... on the
database . If
a person enter big buddy in the search form , the ...big fat
buddy. data will not be found . Any suggestion ?
select * from table where data like %keywords%;
You can break up the search terms into words and do
This might not be the best place for this but here goes.
You are correct. At the very least, you should probably be using the
general PHP list, not the database one.
I want to create a dropdown list with a date range of
Not to be obstinate, but it looks like you already have. But, assuming
When I select data from my data base I have spaces on the lead side for
example the data that is stored is 33.jpg. Spaces included,
exclude the quotes, quotes are example only to show the spaces.
I would like to remove these spaces. Is there a way to do this?
You can definitely do this and
To make a donation, simply login to PayPal and click the Send Money
tab at the top of your screen. Once there, put
[EMAIL PROTECTED] in the Recipient's Email field and fill
out the remaining fields to your liking. :)
Even though this thread is much more PHP-related than many of the
topics
As of Version 4.0.1, MySQL can also perform boolean full-text searches
I am running Mysql 3.x . This sounds like a simple task to me. Is it
not
implemented in 3.x?
It does not have to be OR, NOR or anything, just AND
I've never tried it, but you might be able to get away with
SELECT columns FROM
I do get results for islands in greece as well. How can I specify in my
statement, that both words have to be present?
From the MySQL manual:
As of Version 4.0.1, MySQL can also perform boolean full-text searches
using the IN BOOLEAN MODE modifier.
mysql SELECT * FROM articles WHERE MATCH
Im looking at venturing into working with PHP's ODBC extention.
Does anyone have any recommendations as to a Database, that is easy to
understand/get into from a novice point of view, that installs on
windows 2k,
and is free?
MySQL is kind of free, installs on W2K and is easy to use but it
I just need to know how to enter the data submitted by an html form
into a
MySQL DB.
I have already created the form, and the variables in that form - just
need
to know the query use to insert that data.
The query will be something like
INSERT INTO tablename (column1, column2, column3, ...)
First, please don't cross-post. The PHP-DB list is the proper one for
this question.
If you can connect via the mysql monitor but not with PHP, I expect the
problem has to do with your host.
Larry
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
First, this should probably be sent to the PHP general mailing list,
not the PHP-DB one.
Does anyone know if there is a function in PHP that allows you to
right-click on an item, and from there a drop down menu pops up and you
can go to another screen, preserving that value that was clicked on?
I am a fresh man in MySQL,Can anyone tell me how i begin to
learn it?
www.mysql.com is a really good place to start.
and what are the different between MySQL and other commerce relative
database?As what I known,My SQL is free,but other commerce RDB is very
expensive! Why MySQL not in
if ($category = 2 and $subcategory = 52)
{
header(Location:
http://www.vanderbilt.edu/register/ca/vacation_rentals.php;);
}
elseif ($category = 2 and $subcategory = 50)
{
header(Location:
http://www.vanderbilt.edu/register/ca/rentals.php;);
} , etc.
for some reason all the elseifs
Hello PHP world!!! i've just finisched installing Apache 1.3.27
with PHP4 and 1.4 in Windows 2000. I've installed all off the scripts
that function all right in Linux Red Hat in Windows 2000, but when it
comes to do a simple select to a table that does exist and the select
is all right
do you have any idea why the following(line 106)would return the
following
error message ? the login.php has an included form to create an
account and that is what will not connect.
$connection = mysql_connect($host, $user,$password) //this is line 106
Warning: Access denied for user:
I've setup a form to submit data into my MySQL database and it appears
to
connect properly and whatnot but when I check to see that the data has
been
inserted properly using phpMyAdmin, the table refelcts a new row entry
but
the fields are empty. ???
I suspect this is a register_globals
38 matches
Mail list logo