There is also the very good PEAR Excel Writer class.
http://pear.php.net/package/Spreadsheet_Excel_Writer
Ignatius
- Original Message -
From: "John Holmes" <[EMAIL PROTECTED]>
To: "Stéphane Pinel" <[EMAIL PROTECTED]>; "'PHP DB'"
Sent: 22 December 2004 20:54
Subject: Re: [PHP-DB] PHP Cla
have a look at the PEAR Pager class.
very useful.
_
- Original Message -
From: "David Ziggy Lubowa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 16 December 2004 23:38
Subject: [PHP-DB] Pagination
>
>
> Hey guys,
>
> I am working on an internal db and i ha
Very simply, because a clause
WHERE sales * cost > 100
would look up to "sales" and "cost" in the expression as SELECT fields.
Your clause will wotk if you add "sales" and "cost" to the SELECT fields,
but that would not be economical:
- you don't need them in the result
- you will execute the caclu
I am fairly confident that in this particular case the opinion(s) contained
within this email would nicely coincide with
those of St. Jude Children's Research Hospital.
We live in a world full of geometry.
Ignatius Reilly
_
- Original Message -
From: &qu
Dezign / MySQL Importer
www.datanamic.com
HTH
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
look at the PEAR HTML_Javascript class
_
- Original Message -
From: "Chris Payne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 26, 2004 2:18 AM
Subject: [PHP-DB] PHP Array to Javascript?
> Hi there everyone,
>
>
>
> I set an array using
You may profitably investigate PEAR Quickform.
Nice client-side and server-side validation functions to do just that.
HTH
_
- Original Message -
From: "Hafidz Abdullah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 24, 2004 10:43 AM
Subject: [PHP
n-hand to decide if I want to 'output' the record or not.
>
> Let me know if you want more detail. It would resolve the present issue if
> it can be done in a query(and improve my sql knowledge).
>
> >_
> >- Original Message -
>
1. What prevents you from implementing the conditions directly in SQL? You
can achieve a lot with CASE and IF.
2. For your paging needs, you may benefit from investigating the PEAR
HTML_Pager class.
Ignatius
_
- Original Message -
From: "Ross Honniball" <[EMAIL PROT
Dezigner
www.datanamic.com
Excellent piece of software.
_
- Original Message -
From: "Vincent Jordan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 28, 2004 1:27 PM
Subject: [PHP-DB] MySQL software question
> Is there a piece of software that
Why silly??
it just makes you wait one second on the login page BEFORE the validation
process, not on other pages.
I use it everywhere.
Ignatius
_
- Original Message -
From: "Daevid Vincent" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "'..: GamCo :..'" <[EMAIL
sleep( nb of seconds ) ;
_
- Original Message -
From: "..: GamCo :.." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 20, 2004 9:44 AM
Subject: [PHP-DB] Wait Statement... ?
> Hi all,
>
> I would like to add a line of code in PHP that will execute
For some of my sites I use a XML file to list all the pages in a structured
manner (sections, access rights, etc.)
I generate the site map by using a XSLT sheet.
_
- Original Message -
From: "Dermot Mc Laughlin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tues
PHP5:
www.ovh.com
MySQL 4.1
probably nobody.
First beta (4.1.3) was released only a few days ago
_
- Original Message -
From: "Jensen, Kimberlee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 08, 2004 11:28 PM
Subject: [PHP-DB] Web host offering
Hi the Third,
have you considered dumping the table into a text file?
SELECT *
FROM mytable
INTO OUTFILE "c:/..."
this (AFAI) does not cause memory issues
Ignatius
_
- Original Message -
From: "Leo G. Divinagracia III" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
S
Here is how I would do:
1. Group your visits by IP, order them in time and give each row a
sequential number starting with 1
(not completely trivial - exercise left to the reader)
Now you have a temporary table T ( ip, timestamp, rank )
2. Join the table to itself on two consecutive rows, and co
LAST_INSERT_ID() is connection-based, not table-based.
Therefore instead of:
SELECT LAST_INSERT_ID() FROM foo_table
you should do:
SELECT LAST_INSERT_ID()
HTH
Ignatius
_
- Original Message -
From: "Marc Soler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Mond
Hav you tried enclosing the table name with backticks:
SELECT ...
FROM `16-05`
...
Ignatius
_
- Original Message -
From: "Martin E. Koss" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 17, 2004 10:48 AM
Subject: [PHP-DB] Wrong table name - can it be
With the PHP IMAP functions you can process your mail box programmatically
as a data repository.
_
- Original Message -
From: "Ruprecht Helms" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 01, 2004 9:40 PM
Subject: [PHP-DB] Procedure for submitting
You can't with standard SQL, nor with MySQL.
_
- Original Message -
From: "JeRRy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 30, 2004 3:04 PM
Subject: [PHP-DB] inserting same data into multiple tables question (?)
>
>
>
> Hi,
>
> I want t
in script;
Now, if there's a POST variable named ID containing an INT matching the
database, and I use $_REQUEST instead of $_GET, I'm in trouble!
Mike
On Apr 29, 2004, at 11:00, Ignatius Reilly wrote:
> even better:
> $_REQUEST['variable_name']
>
> so that you
even better:
$_REQUEST['variable_name']
so that you don't have to bother checking both depending on whether your
form was GETted or POSTed.
_
- Original Message -
From: "Mikael Grön" <[EMAIL PROTECTED]>
To: "Kim Jacobs (Crooks) - Mweb" <[EMAIL PROTECTED]>; <[EMAIL
The functions do not exist.
However, FULLTEXT indexes will do much of this work for you. I encourage you
to experiment with them.
_
- Original Message -
From: "Gavin Amm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 28, 2004 7:18 AM
Subject: [P
al with languages which do not separate words by
whitespaces (in my case Japanese)
HTH
Ignatius
_
- Original Message -
From: "Gavin Amm" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>
Sent: Wednesday, April 28, 2004 10
Use only one query:
SELECT
category,
item,
...
ORDER BY category, item
Now fetch rows, and keep the latest categoryID in a flag variable:
- if fetched categoryID <> flag, close table, create a new table, add header
row
- otherwise add content row to the current table
- update flag with the latest
SELECT
IF( B.Booking_End_Date != "-00-00",
DATE_FORMAT( B.Booking_End_Date, "%Y-%m-%d" ),
"N/A"
) AS Booking_End_Date
FROM Bookings AS B, etc.
HTH
Ignatius
_
- Original Message -
From: "Shaun" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
S
Use the cURL library.
_
- Original Message -
From: "matthew perry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 15, 2004 6:39 AM
Subject: [PHP-DB] links to maps
> Anyone know a quick and easy way to fill in the address on a yahoo maps
> form
jpgraph is great
http://www.aditus.nu/jpgraph/
open source, very reasonably priced
Ignatius
_
- Original Message -
From: "Craig Hoffman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 06, 2004 4:55 PM
Subject: [PHP-DB] Graphing - bar charts
> H
_
- Original Message -
From: "Alireza Balouch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 31, 2004 12:25 PM
Subject: [PHP-DB] Firebird
> It looks like firebird database is on its way to replace of mysql...
E???!!!???
How would you bac
The same can be achieved by using the excellent PEAR HTML_TreeMenu class.
Key advantage, of course, is that the API is in PHP.
HTH
Ignatius
_
- Original Message -
From: "Paul Miller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 30, 2004 4:22 PM
Maybe you forgot a "?":
Alert(); or
^^^
Ignatius
_
- Original Message -
From: "Gamze Başaran" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 08, 2004 2:49 PM
Subject: [PHP-DB] javascript question
> Hi everyone;
>
> First of all I'm sorry m
Check the excellent JPgraph library.
http://www.aditus.nu/jpgraph/
_
- Original Message -
From: "Carlos D. Carrasco" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 06, 2004 17:32
Subject: [PHP-DB] I'm new on the list and have a question.
> Hi,
You can do it in SQL:
INSERT
...
SET = NOW()
Ignatius
_
- Original Message -
From: "..: GamCo :.. Gawie Marais" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 04, 2004 14:35
Subject: [PHP-DB] Php datetime
> hi,
>
> i have created a mysql table
$rowArray = mysql_fetch_array($result);
> $access1 = $rowArray[1];
>
> if ($access1 =='2'){
> echo "Access is 2 ";
> } else {
> echo "acces is not 2";
> }
> }
>
> I get always access not 2 how can I make this If works
&
SELECT
...
FROM users
WHERE FIND_IN_SET( 2, values ) > 0
Ignatius
_
- Original Message -
From: "peppe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 04, 2004 12:28
Subject: [PHP-DB] SELECT
> Hi I have a table users with columns name email and
Your question is rather vague. What kind of "help" are you seeking?
If of the kind "contracting out", we'll be glad to answer your RFQ.
Cheers
Ignatius
__
AUDERGHEM ANALYTICA
Web applications specialists
www.auderghem-analytica.com
Brussels, Belgium
_
Two ways:
- full path (like "c:/temp/data.txt")
- simple file name: MySQL will assume the file is located in the current
database data directory (like d:/mysql/data/my_database)
_
- Original Message -
From: "JeRRy" <[EMAIL PROTECTED]>
To:
# if applicable
( First, Last, Title ) # actual order of your
columns in your txt file, mapping columns names
HTH
Ignatius
_
- Original Message -
From: "JeRRy" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>; <[EMAIL
G'day, mate,
With MySQL LOAD statement, you can specify which columns of your text file
goes to what DB column.
HTH
Ignatius
_
- Original Message -
From: "JeRRy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 01, 2004 10:08
Subject: [PHP-DB] plain-
Unless you are using 4.1 (which allows subqueries), you should perform 3
queries, the first 2 creating temporary tables:
- sum
- difference
- left join
Ignatius
_
- Original Message -
From: "rogue" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February
Hmmm...
Better try:
WHERE (LEFT( Brick,3) = LEFT(`Post Code`,3))
^^ no quotes^^ back ticks (because of the
space in the column name)
HTH
Ignatius
_
- Original Message -
From: "Ricardo Lopes" <[EMAIL PROTECTED]>
To: "Shaun" <[EMAIL PR
UPDATE table
SET column = CONCAT(
MID( column, 2, LENGTH( column ) - 1 ),
MID( column, 1, 1 )
)
WHERE column LIKE 'M%'
HTH
Ignatius
_
- Original Message -
From: "Shaun" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 10, 2004 14:15
Subjec
the data comes from one table.
>
> This would be probably very stupid in a financial or medical database
which
> has tens of millions of records and 100s if not 1000s of tables but SEEMS
> (I'm very open to being corrected) to work better on a fairly small web
> accessed datab
k with. A few hundred to a few thousand records, maybe 20 fields,
> rarely adding another field.
>
> I wonder sometimes whether it make sense to put everything in one table
> instead of using joins.
>
> yours, putting-his-foot-in-his-mouth,
>
> Gil
>
>
> > -O
k that the required monomes have been associated as
a complex rule.
HTH (hope I am right! - not tested)
Ignatius
_
- Original Message -
From: "John Dillon" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>
Sent: Saturday, February
Use the second design. SQL 101 / 1st normal form.
_
- Original Message -
From: "mayo" <[EMAIL PROTECTED]>
To: "php-db" <[EMAIL PROTECTED]>
Sent: Saturday, February 07, 2004 23:19
Subject: [PHP-DB] FW: db design - which is better
>
>
> -Original Message-
> F
Quotes:
$_POST['testField']
_
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 07, 2004 20:36
Subject: [PHP-DB] Question
> Dear friends,
>
> On submitting form to mysql database I get a parse error,There is no
problem
A bit of algebra first:
any expression formed of atomic expressions, AND, OR and parentheses can be
reduced to a "canonical" form, by using the De Morgan laws:
a AND ( b OR c ) is equiv. to a AND b OR a AND c
So a rule can eventually be reduced to "AND" groups, joined by "OR":
a(1) AND... AND a(n
Check this class:
http://sourceforge.net/projects/phpexcelreader/
HTH
Ignatius
_
- Original Message -
From: "Griffiths, Daniel" <[EMAIL PROTECTED]>
To: "Bruno Pereira" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, February 06, 2004 10:10
Subject: RE: [PHP-D
By "pop-up" do you really mean "pop-up" or rather drop-down boxes?
Have a look at the PEAR Quickform class and its "hierselect" form element
(hierarchical dropdown boxes)
http://pear.php.net/manual/en/package.html.html-quickform.tutorial.php
HTH
Ignatius
_
- Original M
C'est possible!
I use the PEAR Spreadsheet_Excel_Writer for this purpose. Very nice.
HTH
Ignatius
_
- Original Message -
From: "Christine Clerc" <[EMAIL PROTECTED]>
To: "PHP DB list" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 11:02
Subject: [PHP-DB] From
Hmmm...
I would not bet money on John Holmes bad coding.
(disclaimer: I have no financial stake in PHP|A, other than being a happy
subscriber)
More likely the original question was not well formulated.
cheers
Ignatius
_
- Original Message -
From: "Martín Marqués" <
The best way I can think of is:
- create a temporary table T with an autoincrement field + desired output
column structure
- perform a INSERT INTO T SELECT 0, in the temp table
- you now have the desired result in your temp table
HTH
Ignatius
_
- Original Message -
SELECT favourite_nb, COUNT(*) AS tally
FROM mytable
GROUP BY favourite_nb
HTH
Ignatius
_
- Original Message -
From: "js" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 30, 2004 19:07
Subject: [PHP-DB] counting a value
i want to know what i can u
The same can be achieved in a much simpler way with Gettext!
With gettext, you send a file to your translator, and receive the same file
completed. Period.
Instead of logging to a DB, the translator simply creates string
translations with a user-friendly editor, such as the excellent POEdit
(http:
Standard SQL for comparing strings is LIKE
'=' in lieu of 'LIKE' is a MySQL extension to SQL, therefore non-standard.
Ignatius
_
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 16, 2004 15:39
Subject: [PHP-DB] MySQL gener
Usually it is the other way round:
to assemble a page, a script will call successively several XSLT
transformations: eg top, left nav bar, central content, footer...
Each XSLT call returns HTML from content stored in XML.
Ignatius
>
> I also wonder if XSLT can accept any php code?
>
>
--
PHP Dat
extremely powerful.
In addition you can use XSLT if the news are stored as XML strings in the
DB.
HTH
Ignatius
_
- Original Message -
From: "Muhammed Mamedov" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "phpdb"
Somebody with admin rights to this list please castrate this Farinelli user.
Thanks
_
- Original Message -
To: "Ignatius Reilly" <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 20:22
Subject: L'utente Fabio Farinelli ha cambiato indirizzo
Quite right.
When implementing gettext, one will normally use the rule 1 string = 1
sentence (such as "please select a country").
_
- Original Message -
From: "Richard Davey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 19:48
Subject
ent, they'll send you a Spanish one back without messing
> with your tags - only the content gets translated.
>
> Of course, it DOES all come down to dollars and cents and how important
the
> translation really is; only you can decide that.
>
> HTH
>
> Rich
>
I would not consider a DB-based design.
I use two approaches (sometimes mixed):
1. Write content in XML files (one per language) and transform them with
XSLT. This is nice for mostly content-based sites.
2. Write the complete application in English and translate it with the
excellent PHP gettext
If you have to build complex, dynamic tables, do yourself a favour and use a
class that will allow you to feed directly arrays of numbers.
I use PEAR HTML_Table, which is great and easy to use.
You will have recouped the investment of learning the class after about one
hour.
HTH
Ignatius
_
header( "Location: http://..."; ) ;
_
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 02, 2003 12:18
Subject: [PHP-DB] Redirect.
Hi all,
I have a problem.How can I redirect from a PHP script to another script in
asp,
Dear friend, you're besides the point and needlessly condescending.
Michel was asking about something very different: PHP cron jobs, not time
intervals.
Ignatius
_
- Original Message -
From: "Ivan Fomitchev" <[EMAIL PROTECTED]>
To: "Michel GUIRAUDOU" <[EMAIL PROTECT
PHP est un langage de programmation, pas un daemon.
Le plus simple est de créer des tâches automatisées qui exécutent des
scripts PHP.
Sous Windows 2000 c'est très facile: Scheduled Task > Command prompt >
(terminer)
Ensuite tu édites la scheduled task: Properties > Run > c:/php/php.exe
c:/tasks/m
nother
table.
Ignatius
_
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>
Cc: "PHP DB list" <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 16:02
Subject: Re: [PHP-DB] Updating multilple tables?
> All go
One possible reason you did not google back anything is that what you are
asking can't be done in SQL.
In SQL you can update only one table at a time.
Why not write a PHP function that does the job successively on each table?
To list tables in MySQL: SHOW TABLES FROM
HTH
Ignatius
__
at the top of your script, do:
setlocale ( LC_TIME, 'de_DE' ) ;
(assumes your machine has German support installed)
HTH
Ignatius
_
- Original Message -
From: "Ruprecht Helms" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 26, 2003 16:58
Subje
If your "&" is meant as a content data, as opposed to an entity call, then
your XML is probably not valid.
To write "&" as a character, you can either:
- use & directly
- declare an & entity having the value & and write & in your
document
HTH
Ignatius
_
- Original Mess
The standard way is XSLT, for which PHP has excellent support.
However, it takes some effort to learn the language.
Get yourself "XSLT" by Michael Kay, Wrox Press.
HTH
Ignatius
_
- Original Message -
From: "stefan bogdan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]
You may have hit the browser time-out limit, which you can not control (at
least for IE; don't know about others).
To prevent this, arrange for the script send regularly some invisible
content to the browser
(eg send a HTML comment line every 100 lines of your CSV file)
HTH
Ignatius
_
The jpgraph library is what you're looking for.
_
- Original Message -
From: "Hull, Douglas D" <[EMAIL PROTECTED]>
To: "Note To php mysql List (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, November 10, 2003 8:36 PM
Subject: [PHP-DB] dynamic graph on web site
In php/
SQL. Backticks force reading the string as a SQL object (db, table, column),
as opposed to a string.
Eg you could in theory have columns called "select" or "Mes Documents", and
do:
SELECT * FROM `select` AS S, `Mes Documents`AS MD ...
of course it is wholly unadvisable to do so.
Best to steer cl
have a look at the PEAR date package.
http://pear.php.net/package/Date
_
- Original Message -
From: "OpenSource" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 02, 2003 11:13 PM
Subject: [PHP-DB] date function
Hi guys,
This might not be the be
Easy, old boys.
Nobody has "holed" or meant to hole anybody.
Let's keep this ML what it is, that is a great learning and working
instrument.
Ignatius
_
- Original Message -
From: "Jon Kriek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 20, 2003
mysql_fetch_array( $result )
_
- Original Message -
From: "Devon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 20, 2003 3:30 PM
Subject: [PHP-DB] Using two colomns of mysql data as key/value pairs in
arrays
> I have been scouring the online do
One solution is to use a javascript to set your hidden field to
"already_submitted" (or such) at the end of the last form page. Therefore
upon refresh, the user will come to the "already submitted" page. Add one
"already submitted" switch case.
BTW your construct
switch ( ) {
} else
is quite non-
SELECT *
FROM table
WHERE column IN ( 'this', 'that', 'theother' )
Ignatius
_
- Original Message -
From: "Robbie Staufer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 16, 2003 12:10 AM
Subject: [PHP-DB] query for multiple value
$time = "0900" ;
$time2 = substr( $time, 0, 2 ).":".substr( $time, 2, 2 ) ;
Ignatius
_
- Original Message -
From: "Delz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, October 11, 2003 7:17 AM
Subject: [PHP-DB] TIME FORMAT USING PHP
> Hi All,
>
> We h
Specify it only at function definition:
myFunction( &$var1, &$var2 ) {
// ...
}
$var = myFunction( $var1, $var2 ) ;
Ignatius
_
- Original Message -
From: "Jeremy Shovan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 9:54 PM
Subjec
Problem is, REGEX will only test for a match, not returning anything other
than 0|1
You can instead:
1. Use a UDF doing just that (counting occurences in a string):
http://www.tsc.ro/free/
(haven't tried it myself, because no Windows dll available)
2. Replace successively all figures by '' and c
Can't you do without REGEX?
eg WHERE employ_id = '($employ_id)' OR company LIKE '($name)'
REGEXes are expensive.
Ignatius
_
- Original Message -
From: "Shannon Doyle" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 10:18 AM
Subject: [
l Message -----
From: "Ignatius Reilly" <[EMAIL PROTECTED]>
To: "DB list PHP" <[EMAIL PROTECTED]>; "Shaun" <[EMAIL PROTECTED]>
Sent: Friday, October 03, 2003 5:27 PM
Subject: Re: [PHP-DB] Round a number
> SELECT
> TRIM( TRA
SELECT
TRIM( TRAILING
'.'
FROM TRIM( TRAILING '0' FROM mycol )
)
Ignatius
_
- Original Message -
From: "Shaun" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 03, 2003 5:12 PM
Subject: [PHP-DB] Round a number
> Hi,
>
> I have a query that r
If your mail server supports IMAP, you should use the PHP IMAP functions.
Very convenient.
Ignatius
_
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 24, 2003 11:42 PM
Subject: [PHP-DB] Re: Email Application
> Hey
Yeah, banking is too serious a business in Argentina, as everybody knows, to
entrust to MySQL.
Ignatius
_
- Original Message -
From: "Martin Marques" <[EMAIL PROTECTED]>
To: "nabil" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, September 24, 2003 9:24 PM
Quotes missing around $value. Try instead:
mysql_query( "UPDATE tablename SET {$name} LIKE '{$value}' WHERE ID={$id}")
Of course, even though the code does not show, you have properly validated
user input before firing this query...
HTH
Ignatius
_
- Original Message -
read the PHP manual and examples under the function mysql_fetch_array().
I find the MySQL manual is very well done and helpful. I've been using it as
a reference for 2 years. Take a harder look!
Ignatius
_
- Original Message -
From: "-{ Rene Brehmer }-" <[EMAIL PRO
There are many good user-contribued examples in the online PHP manual at
function readdir()
Ignatius
_
- Original Message -
From: "FB" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 05, 2003 11:55 AM
Subject: [PHP-DB] all files in a directory
UNION appeared in MySQL 4.0.0
Mayhap your provider has not yet upgraded.
There is no such thing as disabling/ granting UNION.
HTH
Ignatius
_
- Original Message -
From: "John Ryan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 31, 2003 8:58 PM
Sub
You should be very wary of the CREATE TABLE ... SELECT statement.
>From experience, the types created are not always conform to intuition -
I've had my share of nasty surprises
Much safer to do a CREATE TABLE statement defining the column types, then do
an INSERT INTO ... SELECT
Ignatius
SUBSTRING()
_
- Original Message -
From: "Shaun" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 29, 2003 11:57 AM
Subject: [PHP-DB] SELECT Part of a Field
> Hi,
>
> How can I SELECT a portion of a field in a table for example the first
> charac
You may decide that another RDBMS may suit your needs better. Someone
told me that Oracle is quite nice.
Ig
_
- Original Message -
From: "Martin Marques" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "Peter
(I do not know
what SQL-92 says about this). Therefore data validation should be done
outside MySQL.
Ignatius
_
- Original Message -
From: "Martin Marques" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "Peter Bec
Then a simple substring will do:
UPDATE mytable
SET url = SUBSTRING( url FROM 5 )
btw your date column looks pretty awful.
HTH
Ignatius
_
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>
Cc: &l
hundreds of what? rows or columns?
Ignatius
_
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 28, 2003 11:35 AM
Subject: [PHP-DB] Simple field replace...?
> Hi there,
> I need to take a field in my database, and remove
e logical. I have no quarrel with this behaviour.
Ignatius
_
- Original Message -
From: "Peter Beckman" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, August 27, 2003 4:13 PM
Read the MySQL manual.
"0" value is interpreted as 2000.
Your empty string is converted to an integer, thus 0.
HTH
Ignatius
_
- Original Message -
From: "Peter Beckman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 27, 2003 3:39 AM
Subject: [P
Sorry I don't seem to get it.
1. What is"the import function provided in PHPList" ?
2. What do you mean by "initialize each data record " ?
Ignatius
_
- Original Message -
From: "Creigh Shank" <[EMAIL PROTECTED]>
To: &
1 - 100 of 200 matches
Mail list logo