Does this help???
Gurhan
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 12:33 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Connection Class
So all I would need to do is create a file named db_connection.php3 and
put
in the funct
Hi guys,
I'm running mySQL 3.23.43 at the mo' with PHP-GTK 0.5.0. Long and the short
of the matter is, anyone running mySQL 4.0.2-alpha in anywhere near a
production
environment yet, and if so, how is it? My server is a Win2K Server SP2
box...so how steady are those windows binaries??? :-)
--
Hi Group,
im encountering a problem with safemode and pers. links:
Running unsafe mode everything is fine, when i turn on safemode the call
to mysql-db with mysql_pconnect fails with cant connect to mysql thru
socket /tmp/mysql.sock.
This will only hasppend if i use persistent connect - normal
On Tuesday 22 January 2002 22:35, Johannes Hiemer wrote:
First of all, please keep the discussion on the list!
What did you want it to do?
I want it to do things like inserting into Mysql-dbs
Fetching arrays. Just every Mysql-command which
Is also suported in PHP.
What is it doing now?
Hi,
i coded a Mysql-Class, there are no compiling-errors when i run it.
But the problem is that it doesn´t do what i want it to do.
I added the sourcecode below and would be happy for any sugestions
how to make it better.
Cu Johannes Hiemer
Code:
?
class get_db {
var $database
On Monday 21 January 2002 21:52, Johannes Hiemer wrote:
Hi,
i coded a Mysql-Class, there are no compiling-errors when i run it.
But the problem is that it doesn´t do what i want it to do.
I added the sourcecode below and would be happy for any sugestions
how to make it better.
[snip]
What
Hi,
Could anybody explain to me how I should make a table with usernames and
passwords.
I want to make a site, where users can sign up and enter some values, which
is stored in a different table.
How do I grant the necessary acces to the tables, so users can enter values
into them?
Please help,
Morten,
What's your level of knowledge of both databases and PHP? Please have a
look at the Introductory Tutorial (Link at the top left of www.php.net). At
the end of that tutorial, which is admittedly rudimentary, there are links
to more advanced ones, including ones specifically for user
As Brian Clark just pointed out on php-general, in response to another
issue ...
http://www.faqts.com/knowledge_base/index.phtml/fid/51/
Some very specific refernces. You'll find what you need there.
Miles
At 06:08 PM 1/19/2002 +0100, Morten Nielsen wrote:
Hi,
Could anybody explain to me how
Hello.
I am wishing to store all mysql querys in a single file and when they needed
to be ran call them using include mysql.php;
But I keep getting errors saying that its an invalid number of mysql
resoruces or something like that when I bring the query into the atuual file
and dont run it from
Hi,
I have mySQL on LINUX
Does anybody knows a windows software to manage mySQL through win2k
(TCP/IP - Intranet) ?
With mySQL on win2k, you can manage it using a windows interface. I'm
looking for the same kind of interface to manage mySQL on a Linux platform
from win2k.
Thanks.
Jerry
Jerry,
For a command line interface, you can use either putty or TerraTermSSH. I
prefer the former and it's available at
http://www.chiark.greenend.org.uk/~sgtatham/putty/ . The latter is more
Windows-ish.
For a Windows-like interface, through a browser, there is phpMyAdmin, and
others, but
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mySQL administration on Linux through NT
Hi,
I have mySQL on LINUX
Does anybody knows a windows software to manage mySQL through win2k
(TCP/IP - Intranet) ?
With mySQL on win2k, you can manage it using a windows interface. I'm
looking for the same kind of interface
Hi All,
Normally I try not to take work home with me, mainly because I'm good
enough at breaking my own code. In this case, however, I think it might
be a good idea if I knew the answer to the question I was asked.
Basically, there's a PHP script. This script is a rather kludgy way of
Hi
Just noticed that NuSphere are now including the Gemini table type in their
free binary download. It seems that everything is there, apart from the
online backup, which is only available in the commercial version.
I need transactions, and took a look at InnoDB. But it seems to have some
shouldn't it be PASSWORD('madonna') ??
-Original Message-
From: Necro [mailto:[EMAIL PROTECTED]]
Sent: 11 January 2002 04:39
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
http://www.hotscripts.com/Detailed/4219.html --- that is the script
But I cannot use crypt
Lo all,
Slight problem on an auth script...
Warning: Supplied argument is not a valid MySQL result resource in
d:\htdocs\infekt\packages\auth.inc on line 104
Line 26: define( DATABASE, imanager );
Line 103: $arg = select password, 1 as auth from acl where
username='$username' and
The use of the MD5 function in the query doesn't look quite right.
Shouldn't it be MD5('$password') or MD5('$username'.'$password') if
concatenating?
Also, mysql_db_query() has been a deprecated function for some time now,
mysql_query() is recommended.
Hope this gets you going - Miles
argument is not a valid MySQL result resource in
d:\htdocs\infekt\packages\auth.inc on line 104
Andrew
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:05 AM
To: Necro; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource
MySQL result resource in
d:\htdocs\infekt\packages\auth.inc on line 104
Andrew
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:05 AM
To: Necro; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource
The use of the MD5 function
() );
$row = mysql_fetch_array($result);
Andrew
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:36 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Break up the code.
I assume you are connecting to the database
() );
$row = mysql_fetch_array($result);
Andrew
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:36 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Break up the code.
I assume you are connecting to the database
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 3:08 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Can you try this puppy at the MySQL console? I'd dearly love to know where
andrewd is coming from, it sounds
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 4:09 PM
Subject: RE: [PHP-DB] MySQL Result Resource
Yep,
andrewd is the username im trying to get this script to work with, its an
authentication script..
The result of echo $arg is the following:
select password, 1
PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource
I was having something similar and solved it by wrapping the column names in
parentheses:
select password, 1 as auth from acl where (username='andrewd' and
password=MD5(andrewd.madonna));
It might help. or eliminate something if I'm
try this :
select password, 1 as auth from acl where (username='andrewd' and
password=MD5(andrewd.madonna));
- Original Message -
From: Necro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 6:18 PM
Subject: RE: [PHP-DB] MySQL Result Resource
Same error
table 'andrewd' in where clause
Andrew
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 3:08 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Can you try this puppy at the MySQL console? I'd dearly love to know
2002 3:28 AM
To: Necro
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource
try this :
select password, 1 as auth from acl where (username='andrewd' and
password=MD5(andrewd.madonna));
- Original Message -
From: Necro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday
[mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 3:29 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
LIGHT just came on!!! Why does ittake so long.
MD5(andrew.madonna) - I think you're goint to have to do this
$passhash = $username . $password
and use MD5
-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 3:29 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
LIGHT just came on!!! Why does ittake so long.
MD5(andrew.madonna) - I think you're goint to have to do this
$passhash = $username
try :
$arg = select password, 1 as auth from acl where (username='andrewd') and
password=MD5(concat(username,password));
HTH
Andrey
- Original Message -
From: Necro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 6:29 PM
Subject: RE: [PHP-DB] MySQL Result
Addressed to: Necro [EMAIL PROTECTED]
[EMAIL PROTECTED]
** Reply to note from Necro [EMAIL PROTECTED] Fri, 11 Jan 2002 03:41:43 +1100
select password, 1 as auth from acl where (username='andrewd' and
password=(163e06103a371fd95b21b4a849bb4b91))1064 : You have an error in your
username='andrewd' and password =
'PASSWORD(madonna)'Resource id #2
Any ideas?
Andrew
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 8:56 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Addressed to: Necro
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 8:56 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Addressed to: Necro [EMAIL PROTECTED]
[EMAIL PROTECTED]
** Reply to note from Necro [EMAIL PROTECTED] Fri, 11 Jan 2002
03
either.
Andrew
-Original Message-
From: Daniel Barton [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:40 PM
To: Necro
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource
Andrew:
Don't put quotes around your MySQL function call.
i.e.
PASSWORD($password
]]
Sent: Friday, 11 January 2002 3:30 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Daniel,
I had tried both with and without quotes. Neither work.
Without quotes I get:
select password, 1 as auth from acl where username='andrewd' and password =
PASSWORD(madonna)1054
On Friday 11 January 2002 10:33, Necro wrote:
Ok,
I have tried to go to PASSWORD after none of the suggestions worked out.
The current statement is:
$arg = select password, 1 as auth from acl where username='$username' and
password = 'PASSWORD($password)';
But the error I get now
Can someone please explain this to me?! It's a real puzzle..
Using the password('abc') command in a MySQL insert statement works for me
but using it again in a select statement does not. Well--it does in one
MySQL database I have but doesn't in another one. I've done exactly the same
PROTECTED]]
Sent: Thursday, January 03, 2002 8:43 AM
To: PHP Mailing List
Subject: [PHP-DB] MySQL Password Writes but Doesn't Read!@#%^
Can someone please explain this to me?! It's a real puzzle..
Using the password('abc') command in a MySQL insert statement works for me
but using it again
Hi there,
I format my results using the following code:
?
// format results by row
while ($row = mysql_fetch_array($sql_result)) {
$title = $row[title];
$desc = $row[description];
$image = $row[image];
$url = index3.php?image=.($row[image]);
?
a href=?=$url??=$PHPSESSID?img
: Shannon Doyle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 19, 2001 4:19 PM
Subject: [PHP-DB] Mysql result resource error
Hi People,
I am getting a Not a valid Mysql result resource error with the
following code, can someone take a look at this for me and see
:)
Chris
}:)
-Original Message-
From: nautilis [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 5:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL date formats
Hi everyone!
I have a little problem with my MySQL database in the way it stores dates.
The only
]
Cc: 'nautilis'
Subject: RE: [PHP-DB] MySQL date formats
nautilis,
Leave the date in the database in MySQL format (/MM/DD) and when you
need to display the date on your page, just do this:
?php
explode(/, $datearray);
$date = $datearray[2].'/'.$datearray[1].'/'.$datearray
, $thedate[1]=MM,
$thedate[2]=
$db_date = date(Ymd, mktime(0,0,0,$thedate[1],$thedate[0],$thedate[2]) );
-Original Message-
From: nautilis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 11:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL date formats
Hi everyone!
I have
Hi there everyone,
This is probably a really simple problem but for the life of me I can't figure out
what i'm doing wrong.
My problem is I am getting 20+ results from a DB to display without any problems with
the images etc . but they display one ontop of another (Of course with spacing
A sample of what you were trying would have been helpful...
If I understood your problem right, the solution is a piece of code like this:
?
echo(table\ntr\n);
while ($myrow=mysql_fetch_row($result))
{
$colcount++;
if ($colcount==$desiredcolcount)
{
$colcount=0;
}
of the same data. Its like it is doing each
query three times or something.
Don't know why it is doing that.
- Shannon
-Original Message-
From: Jim Lucas [mailto:[EMAIL PROTECTED]]
Sent: Friday, 21 December 2001 03:52 AM
To: Shannon Doyle; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Mysql
ORDER BY field DESC
At 07:27 AM 12/19/2001, Brian Grayless wrote:
How you do a reverse order by in SQL, kind of like ORDER BY field only
reverse the order???
Sliante,
Richard S. Crawford
http://www.mossroot.com
AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
MSN: [EMAIL PROTECTED]
It is only
How do i get all the info for mysql just the EXPLAIN statement in postgres
--
Feel free to contact me (flames about my english and the useless of this
driver will be redirected to /dev/null, oh no, it's full...).
(Michael Beck, describing the PC-speaker sound device)
It's not the IN, it's the sub-query you cannot use. MySQL doesn't support
them and it's just about the main reason I don't like it.
Alternatives? You could execute your subquery and return the results to an
array. Loop through the array, using the index and the indexed element to
drive a
I dont think we can use 'IN' and 'NOT IN' in mysql. Is there an alternative
that would work?
select * from lib_asset_tbl where material_id '' and asset_id in (select
asset_id from lib_copy_tbl)
Help is appreciated.
Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.
--
PHP
Hello,
Is there a way to rollback a 'delete from table;' command in MySQL
3.23.36-1? Yes I did it... I pressed enter instead of backspace.
Did I lost my table content? I have no backup of this especific database.
PS: I didn't close the connection with the database yet.
Thank for any help, even
Is there a way to rollback a 'delete from table;' command in MySQL
3.23.36-1? Yes I did it... I pressed enter instead of backspace.
Did I lost my table content? I have no backup of this especific database.
PS: I didn't close the connection with the database yet.
Thank for any help, even
Pereti [EMAIL PROTECTED]; PHP-DB
[EMAIL PROTECTED]
Sent: Thursday, December 06, 2001 8:41 AM
Subject: Re: [PHP-DB] MySQL table recovery.
Is there a way to rollback a 'delete from table;' command in MySQL
3.23.36-1? Yes I did it... I pressed enter instead of backspace.
Did I lost my table
Velev
Web Developer
http://www.websitepulse.com/
-Original Message-
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Thursday, November 29, 2001 23:48
Subject: [PHP-DB] MySQL socket error
Hi
I'm having a really big problem at the moment (or at least
Im managing a really crowded webservers. We have article system implemented
in php and backend db is mysql (not my first choise but hey, it does the
job)
Few version numbers:
PHP: 4.0.6 (Self compiled, w/ gcc in solaris8)
Mysql: 3.23.24 (Self compiled, w/ gcc in solaris8, ok, not the latest
Hi
I'm having a really big problem at the moment (or at least my server provider
is and it's gettting abit tiresome!)
I've been using PHP/MySQL combo for a looong time, and never come across this
error before, and I don't know exactly what is causing it.
There's a new installation of php4.04
Hi,
SELECT aaa45aaa REGEXP aaa(\d\d)aaa - returns 1;
is there any function in mysql to return 45 instead on 1 ?
Arash
http://www.dejkam.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
I occasionally receive an error message saying that PHP was unable to create
a UNIX socket (55). Anyone else have this error or know what it is?
- Jonathan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Okay, this is beginning to bug. I have an application that uses several
databases, and it restarts daily - anywhere from 1-8 times per day. This is
not supposed to happen at all unless we manually restart the server. But I'm
beginning to experience frequent problems with it just restarting out of
You have the wrong list.
http://www.mysql.com/documentation/lists.html
-Original Message-
From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 2:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Restarting A LOT
Okay, this is beginning to bug. I
-Original Message-
From: Matthew Loff [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 1:18 PM
To: 'Jonathan Hilgeman'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Restarting A LOT
You have the wrong list.
http://www.mysql.com/documentation/lists.html
-Original Message-
From
Hi folks--
I'm working on an installation of phpshop 0.6x and have started getting too many
connections to the database errors whenever I work with it for any length of time. I
have a heavily database-driven and busy site calling on three databases. Having heard
that mysql_pconnect is better
There is a setting when you launch MySQL to tell it how many connections
it will accept. Read the following to get a better idea on this:
http://www.mysql.com/doc/T/o/Too_many_connections.html
The default number of connections to MySQL is 100, but can be set much
higher if necessary. You
Many thanks, I'll let you know how it works out.
Best,
Lynn
--
Lynn Siprelle, Siprelle Associates: Web Publishing
Chief Assoc. Josephine b. 9/9/97 * New Assoc. Louisa b. 4/25/01
Business: lynn@siprelle com | Personal: [EMAIL PROTECTED]
The New Homemaker: http://www.newhomemaker.com/
--
PHP
I have this code:
?
$dir = getcwd();
$fpName = tempnam($dir, tableData);
$fp = fopen($fpName, w);
fputs($fp, $strData);
fclose($fp);
$QueryInsert =
LOAD DATA INFILE '$fpName'
INTO TABLE feStatics
FIELDS TERMINATED BY '|'
LINES TERMINATED BY '\n'
;
2 things:
mysql_query($QueryInsert);
print mysql_error();
Should read:
$query = mysql_query($QueryInsert) or die(mysql_error());
and:
It returns Can't get stat of '/www/publico2/tableData0TMRRy' (Errcode: 13).
what exactly is: tableData0TMRRy?? if it should be a file, it should be
Petr Tuma wrote:
What error message it produce?
Ok, table titles is composed of:
+--+-++
| titlesid | releaseyear | title |
+--+-++
mysql select *,(case when title like 'The %' then substring (title, 5, 255)
Message-
From: Ian Evans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 01, 2001 9:20 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL: Alphabetizing title results in library
format
Petr Tuma wrote:
What error message it produce?
Ok, table titles is composed
Cami wrote:
Try this:
mysql select *,(case when title like '%The%' then substring (title, 5, 255)
when title like '%A%' then substring (title, 3, 255) when title like '%An%'
then substring (title, 4, 255) else title end) as sort_col from titles order
by sort_col;
Argh, that still produces
what the manual say.
Cami
-Original Message-
From: Ian Evans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 01, 2001 9:20 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL: Alphabetizing title results in library
format
Petr Tuma wrote:
What error message it produce?
Ok, table
Hi,
seems a bit strange.
Try this select (use mysql client)
mysql select title,if(title like 'The %','yes','no') from titles;
if it works try substring functions and if that works try 'order by' clause.
It's at least working on server v. 3.23, so in case it will not work find out
in the 'list
Back when I was working with MSSQL I need to alphabetize movie titles in
the proper library format where 'A' 'An and 'The are ignored.
For MSSQL I was told to use:
select *
from Titles
order by case when Title like 'The %' then substring (Title, 5, 255)
when Title like 'A %' then substring
Petr Tuma wrote:
select *,(case when Title like 'The %' then substring (Title, 5, 255)
ETC.
Alas, MySQL doesn't like that syntax either. :(
--
Ian Evans
Digital Hit Entertainment - News and Information
http://www.digitalhit.com
--
PHP Database Mailing List (http://www.php.net/)
To
I have a problem here which I can not find an answer.
My date fields (EmailD in this case) can be in four different formats:
a) dd.mm.
b) d.mm.
c) dd.m.
d) d.m.
So this is what I've tried to do to convert the dates to -mm-dd
format:
INSERT INTO feCompsT (ID, Company,
Ok, found the problem.. I've been fighting with this for like an hour
but the error was here:
POSITION() should be LOCATION().. Way to go Niklas! :)
Niklas
-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: 29. lokakuuta 2001 15:46
To: Php-DB
Subject: RE: [PHP-DB
I have a large table with quite many dates in format dd.mm. (don't
ask why :) and I want to convert them into -mm-dd for obvious
reasons. How can I do this the smartest way? I know I could do it with
php and update it row by row but that doesn't seem too smart. Can I
somehow do a
I have a large table with quite many dates in format dd.mm. (don't
ask why :) and I want to convert them into -mm-dd for obvious
reasons. How can I do this the smartest way? I know I could do it with
php and update it row by row but that doesn't seem too smart. Can I
somehow do a copy
Hi everybody,
I am looking for scripts able to build diagram of a database (diagram such as
the ones made on SQL server).
For the ones not familiar with SQL server, it should be a script able to :
- collect the data of the structure of a database (names of the tables and of
their
Error
SQL-query :
CREATE TABLE mail (
from int(32) NOT NULL default '0',
to int(32) NOT NULL default '0',
subject varchar(80) NOT NULL default '',
message text NOT NULL
) TYPE=MyISAM
MySQL said:
You have an error in your SQL syntax near 'from int(32) NOT NULL default '0',
to
On Sat, 27 Oct 2001 13:36:57 +1000
Andrew Duck [EMAIL PROTECTED] wrote:
Error
SQL-query :
CREATE TABLE mail (
from int(32) NOT NULL default '0',
to int(32) NOT NULL default '0',
subject varchar(80) NOT NULL default '',
message text NOT NULL
) TYPE=MyISAM
MySQL said:
How can I query for specified fields that has to contain atleast 2
charters?
Example:
Field AAA contains '' (NULL) = No match
Field BBB contains ' ' (one charter) = No match
Field CCC contains 'ab' = Match
Field DDD contains 'abcdefg' = Match
Niklas
Assuming you're using MySQL - 35 seconds is all it took to find:
http://www.mysql.com/doc/P/a/Pattern_matching.html
Good luck!
Russ.
On Thu, 25 Oct 2001 14:16:40 +0300 =?iso-8859-1?Q?Niklas_Lamp=E9n?=
[EMAIL PROTECTED]
wrote:
How can I query for specified fields that has to contain atleast
REGEXP '..+'
-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 6:17 AM
To: Php-DB
Subject: [PHP-DB] mySQL Query and blank fields
How can I query for specified fields that has to contain atleast 2
charters?
Example:
Field AAA contains
On Thursday 25 October 2001 13:16, Niklas Lampén wrote:
How can I query for specified fields that has to contain atleast 2
charters?
SELECT * FROM foo_table WHERE length(bar_field)=1;
Arpi
Example:
Field AAA contains '' (NULL) = No match
Field BBB contains ' ' (one charter) = No
Change that to:
SELECT * FROM foo_table WHERE length(bar_field)1;
-Original Message-
From: Tamas Arpad [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 8:01 AM
To: Niklas Lampén; Php-DB
Subject: Re: [PHP-DB] mySQL Query and blank fields
On Thursday 25 October 2001 13:16
' not '98765' as I expected.
Niklas
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: 25. lokakuuta 2001 15:56
To: Php-DB
Subject: RE: [PHP-DB] mySQL Query and blank fields
Change that to:
SELECT * FROM foo_table WHERE length(bar_field)1;
-Original Message
?
-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 8:04 AM
To: Php-DB
Subject: RE: [PHP-DB] mySQL Query and blank fields
Thanks a lot! I quite didn't know what to look for in the manual.
I actually have another question:
If I want to update
On Thursday 25 October 2001 15:08, Rick Emery wrote:
First, I wouldn't use length(), I'd use REGEXP: SELECT * FROM
foo_table WHERE fieldname REGEXP '..+'
It's quicker.
regular expression is faster then a length() call? that's seems
strange considering how complex a regexp can be
with
Is there any way to tell when a TABLE in MySQL was last modified?
I don't want to add a timestamp field as there are thousands of rows,
and I just need to know when ANYTHING in the table was last modified.
I haven't been able to find anything on this, and thought I would ask before
kludging
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 4:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Last Modified
Is there any way to tell when a TABLE in MySQL was last modified?
I don't want to add a timestamp field as there are thousands of rows,
and I just need to know when
I am runing RH 7 Mysql (installed of RPM), Apache (compiled version) and PHP
4.0.4pl1
configure command './configure' '--with-xml'
'--with-apache=../apache_1.3.19' '--enable-shared-pdflib'
'--enable-track-vars'
I am trying to connect to a mysql database using the following:
html
Body
?
echo Php
-Original Message-
From: Peter [mailto:[EMAIL PROTECTED]]
Sent: 04 October 2001 16:42
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MYSQL Problems Please help
I am runing RH 7 Mysql (installed of RPM), Apache (compiled
version) and PHP
4.0.4pl1
configure command './configure' '--with-xml
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 04 October 2001 17:11
To: Jason Wong
Subject: Re: [PHP-DB] MYSQL Problems Please help
Jason,
Mysql is running, so thats not the problem.
I tired to run your updatedb to no avail.
my directory for mysql is /var
Hi !
My question is pretty simple. How do I specify a language for MySQL ? I
cannot retreive (or correctly insert, i'm not sure) any accentuated
characters (french canada) from my database with php, ODBC or the mysql
client. I may be a little off-topic, but it's pretty important for me to be
Can someone offer some help...?
Lets say i have a date collumn in a mysql table that includes dates that get
stored each time i enter an entry...
How can i check when i enter the page that displays the entries to delete
all entries older than 30 days?
thanks.
Check the MySQL manual DATE/TIME functions.
try: DELETE FROM mytable WHERE date_column ( CURRDATE()-30 )
-Original Message-
From: Koutsogiannopoulos Karolos [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 7:41 AM
To: 'Php-Db (E-mail)
Subject: [PHP-DB] mysql - php DATE
sorry for misspelling: curdate()
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 8:23 AM
To: 'Koutsogiannopoulos Karolos'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql - php DATE QUESTION...
Check the MySQL manual DATE/TIME
G'day folks:
I have a seemingly simple problem:
I keep my passwords as simple MySQL hashes in a users' table. The rest of the system
is reliant on
this fact (othewise I'd change it quick sharp!)
I've just constructed a simple username/password retrieval system, but don't know how
to unhash
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Russ
Michell
Sent: 25 September 2001 18:32
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Hash Function
G'day folks:
I have a seemingly simple problem:
I keep my passwords as simple MySQL hashes in a users
1101 - 1200 of 1362 matches
Mail list logo