so close heh ... thanks mate :)
and whether they're to actually be deleted, that depends on the application
... I have a few different where I use it.
Rene
At 02:13 03-11-2004, Bastien Koert wrote:
DELETE FROM the_table WHERE `ID` IN(1,2,3,4,5,6) will work just fine. The
trick is to be sure
At 02:37 03-11-2004, Jennifer Goodie wrote:
[snip]
> My current version generates, for multi-select cases, queries like this:
>
> DELETE FROM the_table WHERE `ID`='1' OR ID`='2' OR `ID`='3' OR `ID`='4' OR
> `ID`='5' OR `ID`='6'
>
> or similar with the SELECT statement.
[snip lots of stuff]
> DELETE
-- 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
DELETE FROM the_table WHERE `ID` IN(1,2,3,4,5,6) will work just fine. The
trick is to be sure that
those records indeed are to be deleted. I prefer to mark the record as
deleted for a time before permanent deletion. That way its recoverable
should something really bad happen.
bastien
From: -{
X-posted to MySQL and PHP DB
Hi gang
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 each delete routine. I've still not suceeded in getting
the delete q
select distinct(datefield) from
bastien
From: "Chris Payne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [PHP-DB] How to get unique entries?
Date: Tue, 2 Nov 2004 17:24:48 -0500
Hi there everyone,
Im listing entries by date in a dropdown box, but on some days there are
7-8+ dates th
use the offset parameter
$offset = 0; //and is set from the application
SELECT * FROM blah WHERE something<>0 LIMIT $offset , 5;
bastien
From: [EMAIL PROTECTED] (Jovan Ross)
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Mysql Function to display number of records
Date: 2 Nov 2004 20:28:41 -
I have a
At 23:36 01-11-2004, Eric Cranley wrote:
I tried to find this in the archives. If I missed it, my apologies in
advance.
I'm developing an intranet for my company, and we are planning on putting
sensitive information on it. I've already setup a login system using
sessions, but I'm not sure how to ma
On Tuesday 02 November 2004 22:24, Chris Payne wrote:
> Iâm listing entries by date in a dropdown box, but on some days there are
> 7-8+ dates the same, but I just need it to display each date ONCE in the
> dropdown, but for the life of me I canât remember the command to use to do
> this, can anyo
Hi there everyone,
I’m listing entries by date in a dropdown box, but on some days there are
7-8+ dates the same, but I just need it to display each date ONCE in the
dropdown, but for the life of me I can’t remember the command to use to do
this, can anyone please remind me? I know it was dead
Eric,
Your second approach is fine. It's denormalized, extensible, and can be
manipulated using tools you put in place.
You may want to consider "groups" as well, thus people belonging to a group
could view/edit pages, that has the potential to save a lot of
administrative scut work.
A table
I have a query that uses a LIMIT clause. Let's say it looks like this:
SELECT * FROM blah WHERE something<>0 LIMIT 5;
Ok, now my table really has 20 rows that satisfy the WHERE statement but I
only retrieved 5. There was a function/statement that I could use to find
out the total number of rows t
Eric,
There are, as you will find out, a number of ways you could handle it. The
"right" way is really your decision and it's directly related to the
flexibility, maintainability, and security your site will require.
I have had success in the past using a role-based permission system. For
example
I tried to find this in the archives. If I missed it, my apologies in
advance.
I'm developing an intranet for my company, and we are planning on putting
sensitive information on it. I've already setup a login system using
sessions, but I'm not sure how to manage and store permissions, such as who
Try echoing the actual query being run. It will give you more info to work
with.
Peter
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: 02 November 2004 16:42
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Problem with script
>
>
> Hi all, greetings from
Just looking at the error message shows why it's failing in this case: "'t read
card','1099413551')' at line 1" One of the fields you're trying to insert is likely
'Can't read card', and since in the query you are surrounding it with single quotes,
and it's coughing on the word Can't , which has
On Tue, 2004-11-02 at 10:41 -0600, [EMAIL PROTECTED]
wrote:
> Query failed: You have an error in your SQL syntax. Check the manual
> that
> corresponds to your MySQL server version for the right syntax to use
> near
> 't read card','1099413551')' at line 1
My initial guess is that you do not have
from the brief error message your provided, I think its blowing up on the
single quote contained in the word "can't". you need to handle this by
choosing one a few of these methods
replace all single quotes with two single quotes
$text = str_replace("'","''", $text);
addslashes function
$text =
write a script that will access the information, then use a CRON to schedule
the collection at whatever intervals suite your needs.
Bastien
From: "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL data harvester
Date: Tue, 2 Nov 2004 10:05:5
Hi all, greetings from Phoenix, Arizona!
I'm having a problem with a PHP script and the database it manages.
I'm having his error message:
Query failed: You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
't read car
If what you have below is the exact SQL you have an error:
mysql_query ("INSERT INTO 'footable' (foo1, foo2, foo3, foo4, foo5, foo6,
foo7) VALUES '$foo1', '$foo2', '$foo3', '$foo4', '$foo5', '$foo6',
'$foo7')");
should be
mysql_query ("INSERT INTO 'footable' (foo1, foo2, foo3, foo4, foo5, foo6,
> mysql_query ("INSERT INTO 'footable' (foo1, foo2, foo3,
> foo4, foo5, foo6, foo7)
> VALUES '$foo1', '$foo2', '$foo3', '$foo4',
> '$foo5', '$foo6', '$foo7')"); }
You're also missing an opening bracket after 'VALUES'. The statement should
be:
mysql_query ("INSERT INTO 'foo
My office purchased 21 fascinating cell phones that have GPS locaters and
bar codes.
When we scan a bar code with one of these cell phones, the data is sent to a
third party company; information about this scan is stored on their
database.
I have installed a "harvester" on my pc that downl
On Mon, 2004-11-01 at 21:36 -0600, P. George wrote:
> i know that postgres has a raw binary datatype called bytea for storing
> pictures and whatnot, but i'm having trouble finding an example of
> displaying an image on a web page with php that is pulled directly from
> the database?
>
> is thi
On Tuesday 02 November 2004 13:46, Mark Benson wrote:
> mysql_connect (localhost, foouser, foologin);
Always use check the return value of any mysql_*() function you use and make
use of mysql_error().
> $csvfile = file("http://foo.com/foolist.csv";);
If you're using a newer version of PHP you
> > $csvfile = file("http://foo.com/foolist.csv";);
and this
fopen("http://foo.com/foolist.csv";, "r");
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> //
> mysql_connect (localhost, foouser, foologin);
>
> mysql_select_db (footest1);
>
> $csvfile = file("http://foo.com/foolist.csv";);
>
> foreach($csvfile as $line_no => $datastring) {
> $data = explode (",", $datastring);
> $foo1 = $data[0];
> $foo2 = $data[1];
>
Hi, newbie here, go easy on me I'm learning this as I go ;)
Got a bit of teaser here.
//http://foo.com/foolist.csv";);
foreach($csvfile as $line_no => $datastring) {
$data = explode (",", $datastring);
$foo1 = $data[0];
$foo2 = $data[1];
$foo3 = $data[2];
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 02 November 2004 08:04, GH wrote:
> Therefore everyone in the world has an interest in what happens in the
> american body politic just as Americans have an interest in what
> ha
On Sun, 31 Oct 2004 13:10, -{ Rene Brehmer }- wrote:
> Hi gang
>
> This is possibly insanely simple, but I've been coding on it for the past
> 11 hours, so my head's gone a little fuzzy.
>
> been through the MySQL manual, but it's not really agreeing with me on
> finding anything useful...
>
>
Jason Wong wrote:
On Tuesday 02 November 2004 03:36, P. George wrote:
i know that postgres has a raw binary datatype called bytea for storing
pictures and whatnot, but i'm having trouble finding an example of
displaying an image on a web page with php that is pulled directly from
the database?
i
Would you please stop bombing me with those unrelevant e-mails on a php
mailinglist. It doesn't matter if I care about the US elections or not.
I prefer to read your brilliant php code instead of politics.
With me many others on the list.
Rik
Op dinsdag 2 november 2004 10:25, schreef Michelle
To end up with this discussion:
It is a piece of truth that the whole world is curious on what will
happen during ( ;-) )and after the voting in the US but as the main part
of the world has no effect on the election by using php this posting was
obviously misplaced. Worst of all, this posting st
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 01 November 2004 21:11, Jason T. Davidson wrote:
> Here is the code:
>
>
> cellspacing="0">
>
>
>
>
>while ($check=
On Tuesday 02 November 2004 08:04, GH wrote:
> However, when other countries are in trouble or need something... who
> do they turn to? America
No country or government acts unless it is in their interests (perceived or
otherwise) to do so.
> Therefore everyone in the world has an interest in w
Am 2004-11-02 03:06:35, schrieb GH:
> and by the way the main reason we have problems in America
>
> * People with out health insurance
This is every countries own problem...
In Europe ALL People has a "health insurance".
> * No affordable housing
Is this my problem ?
> * and a hu
> Dear Sir,
> I would like to add SMS Services in my Site. So if any body
> know the scripts in PHP, Could you guide me to my progress..?.
> I think any body have done this kind of work as your company
> projects..!, So i want urgent.
> Regd,
> Ilanthiraian,B
You need to use some kind of SMS gat
Am 2004-11-02 03:04:10, schrieb GH:
> However, when other countries are in trouble or need something... who
> do they turn to? America
Are you sure ?
Its only you American(s) which think so.
> Therefore everyone in the world has an interest in what happens in the
> american body politic just as A
Am 2004-11-01 19:30:50, schrieb Joseph Crawford:
> > Do we care? Realy? Unlikely. Maybe you should send your 'useful' info on
> > a national mailinglist only.
>
> i am sorry but i do care, if you do not care about voting you dont
> care if the war comes to the US.
Maybe, but I am in France !!!
Am 2004-11-02 07:22:13, schrieb Lester Caine:
> There are many more of us who do not have the right to vote in the US,
> just as we do not have the right to claim our 3.5% guaranteed mortgage.
> Americans need to start thinking about OTHER countries rather than
> assuming that they can just bom
and by the way the main reason we have problems in America
* People with out health insurance
* No affordable housing
* and a huge debt
* amongst others
is because we give aid to almost any country who asks for it and
allow them to take the American's jobs...
Just a thought
However, when other countries are in trouble or need something... who
do they turn to? America
Therefore everyone in the world has an interest in what happens in the
american body politic just as Americans have an interest in what
happens to the British Prime Minister and in parts of the British b
42 matches
Mail list logo