At 04/06/2002 08:58, Evgeny Chuykov wrote:
>Try something like this:
>SELECT USERS.Username,FILES.Filename
>FROM USERS LEFT JOIN FILES USING(Id)
>WHERE FILES.Filename IS NOT NULL ORDER BY FILES.Stamp DESC LIMIT 1;
I think it's wrong because Id isn't the matching column in 'FILES'.
2nd line should
Try something like this:
SELECT USERS.Username,FILES.Filename
FROM USERS LEFT JOIN FILES USING(Id)
WHERE FILES.Filename IS NOT NULL ORDER BY FILES.Stamp DESC LIMIT 1;
If Filename declared as NOT NULL then use FILES.Filename!=''
MR> I've been racking my brain for too long on this one, can someone
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] says...
> Hello all,
>
> I've got a bit of a problem at the moment. I'm using the dba_ functions to
> do some simple database access, and I have the need to delete some items
> from the database from time to time. When dba_delete() is called, it
I've been racking my brain for too long on this one, can someone help me
out with a SQL query?
I've got 2 tables in a mySQL database, 'users' and 'files' defined as
such:
USERS
---
Id int (autoincrement)
Usernamevarchar
FILES
--
There is no way to know if the user has left the website. About all you can
do is save a timestamp in the database for every recordable action the user
performs then if no actions take place for say 10 minutes that user is said
to be 'logged out' and you delete the database row and deallocate any
On Tuesday 04 June 2002 00:52, James Kupernik wrote:
> yes because I'm using it in another foreach, but this one doesn't want to
> work.
>
>
> "Pierre-Alain Joye" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > On Mon, 3 Jun 2002 12:48:47 -0400
> >
> > "Ja
yes because I'm using it in another foreach, but this one doesn't want to
work.
"Pierre-Alain Joye" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, 3 Jun 2002 12:48:47 -0400
> "James Kupernik" <[EMAIL PROTECTED]> wrote:
>
> >
> > and I'm getting this:
On Mon, 3 Jun 2002 12:48:47 -0400
"James Kupernik" <[EMAIL PROTECTED]> wrote:
>
> and I'm getting this:
> Warning: Invalid argument supplied for foreach()
>
> Why is that?
are you sure $cart is an array ?
pa
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
I'm using this:
if($save)
{
foreach ($cart as $record => $qty)
{
if($$record=="0")
unset($cart[$record]);
else
$cart[$record] = $$record;
}
$totalPrice = calculate_price($cart);
$items = calculate_items($cart);
}
and I'm getting this:
Warning: Invalid argument sup
You can solve that just by asking for the insert_id that was made. Just
place the following lines after the mysql_query:
$id = mysql_insert_id();
$message = "Record Added (id = $id)";
and you'r done!
Cesar Aracena
[EMAIL PROTECTED]
Neuquen, Argentina
- Original Message -
From: "Antoni
Dear ALL,
I'm programming a web site that has a small shopping cart to sell virtual
information, I must allocate the information I'm selling (Phone Card PIN
Codes) and block it from others, once a user adds it to his cart, and on the
other hand, I must set it free (DeAllocate it) when the user le
On Monday 03 June 2002 17:23, nauti wrote:
> Hi, i am having a problem with my mysql database inserting images in a blob
> field. I upload files from a form using the following code:
[snip]
> half image only, and size is always 65535 bytes.
>
> Is maybe any limitation in the way i do the upload?
Hi, i am having a problem with my mysql database inserting images in a blob
field. I upload files from a form using the following code:
if (isset($binFile) && $binFile != "none")
{
$data = addslashes(fread(fopen($binFile, "r"), filesize($binFile)));
}
else
{
$data = "";
}
If I have just inserted one set of values with mysql_query(INSERT ...) how
can I get the values just inserted (I needed to get an autoincrement value
out of the table)
Thanks
Antonio Bernabei
- Original Message -
From: "César L. Aracena" <[EMAIL PROTECTED]>
To: "PHP DB List" <[EMAIL PROTEC
14 matches
Mail list logo