Pete wrote:
I'm trying to write a query to update the comission calculations on a
database
The sql looks something like
select
(round(pr_contents * 12)+ round(pr_buildings * 12)) *.33 as agent,
(round(pr_contents * 12) + round(pr_buildings * 12)) * .5 as manager,
from pipeline
if there a way
Ohlson Stefan wrote:
Hi!
I have a db where we stores images in the database but I haven't figured out how I display
that image after I've selected it from the table.
I've tried with and but $data just return the Select-query:
Picture
I'm not familiar with fetching data from Oracle, but t
> Hi,
>
> Since i dont know any mysql group, i will try here - it is
> anyway related to
> php.
> When i want to make php/mysql application i have mysql on the
> server and i
> connect to it with mysql_pconnect("localhost","root","") and it works.
> I assume that any user or hacker could connect
> Dear all
>
> Does php have any script which can check if a directory exist
> in specific
> folder?
>
> Thx a lot
>
> Jack
if (is_dir ("/path/to/your/folder") )
echo "Dir exists";
else
echo "Dir doesn't exist";
Regards
Joakim
-
> -Ursprungligt meddelande-
> Från: Snijders, Mark [mailto:Mark.Snijders@;atosorigin.com]
> Skickat: måndag den 11 november 2002 09:03
> Till: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Ämne: RE: [PHP-DB] Find out a pic size?
>
>
> check this out:
>
> http://www.php.net/manual/en/ref.image
> Hi,
>
> I'm working with a lot of picture in a website and the size is not
> always the same.
>
> I need some help on how to find out the size (width and height) of a
> picture. Is there any way to do this (especially with PHP)?
>
> I need it so I can calculate the width and height to be
> On Monday 04 November 2002 19:58, [EMAIL PROTECTED] wrote:
> > > $sql = "select quarter($qdate)" or die("not work #3");
> >
> > change to
> > $sql = "select quarter($qdate) as my_quarter"; //Added an alias to
> > quarter($qdate). Easier to access that way...
> > And there's no need for an 'or die
> > printf("Delete",
> > $PHP_SELF,
> > $myrow["id"]);
> > printf(" > href=\"%s?id=%s&submit=yes\">Update%s
> > %s %s",
> > "update-inv.php", $myrow["id"], $myrow["name"],
> > $myrow["details"], $yyy);
My bad.
Before this printf statement you need
$my_var = mysql_fetch_array($yyy);
and
> $sql = "select quarter($qdate)" or die("not work #3");
change to
$sql = "select quarter($qdate) as my_quarter"; //Added an alias to
quarter($qdate). Easier to access that way...
And there's no need for an 'or die()' here. You're just assigning a variable
and most likely this will allways work!
> Hi Guys,
>
> I did try that but I will try it again.
>
> Also, I have echo'd the data and it does appear as I expect.
>
> Any other thoughts while I try this?
Don't know if this has anything to do with your problem, but
> $headers = "Return-Path: <$support_email>\r\n";
should be
> $headers .=
> How can I get mySQL to group stuff by the day? my date
> coloumn is a UNIX
> timestamp.
SELECT whatever FROM my_table GROUP BY FROM_UNIXTIME(timestamp_col,
'%Y-%m-%d')
Regards
Joakim
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>
>Hello PHP people. I was wondering if I could get a
> question answered?
>
>How would I print a Database Table into a when
> the DB Table
> has 4 columns, AND 4 rows.
>
>See I only know how to print one column.
";
while($row = mysql_fetch_array($result));
{
> OK,
>
> Looks like there are two options
>
> I can either convert the unix timestamp colomn to a mysql
> time one *OR*
> someone can tell me how to use unix timestamps in this query...
>
Try something like this:
SELECT
CONCAT(extract(year FROM FROM_UNIXTIME(time)),
extract(month
> Try instead:
>
> if( $_POST['action'] =="test" ){ echo "Test";}
>
> HTH
> Ignatius
This should really be
if( $_GET['action'] =="test" ){ echo "Test";}
since it's a get-request we're dealing with...
Regards
Joakim
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: ht
Hi,
I think you need to remove echo $src_img; from your non working code as this
is not what you want to do.
And do you have support for GIF compiled in?
Regards
Joakim
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I do not think php is the problem here.
Take a look here
http://www.mysql.com/documentation/mysql/bychapter/manual_Problems.html#Gone
_away
There are some good pointers on what to do...
Regards
Joakim
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/u
Something like this, perhaps?
Might be some errors in it, but you get the idea.
Regards
Joakim Andersson
> -Original Message-
> From: Graeme McLaren [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 5:42 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB]
ch about performance issues, unless you have a really, really huge table.
Regards
Joakim Andersson
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ase,$sql);
If this doesn't help we need to know if you have made this function and if
so we probably need to see the function aswell.
Regards
Joakim Andersson
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> From: Clive Bruton [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 10:24 PM
>
> Joakim, thanks, that sorted it. Just one note, "numrows" in
> the sql query
> should be "num_rows"? That's how I got it to work anyway.
Yes, that's totally correct. Just a typo.
Joakim
--
PHP Database
lace("", "\n", $your_string)
If when you retrieve the data for output to the form, then just don't use
nl2br().
Regards
Joakim Andersson
>
> Thanx for any help,
>
> Andy
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
while ($myrow = mysql_fetch_row($result)) {
printf("%s %s%s\n", $myrow[1],
$myrow[2], $myrow[3]);
}
echo "\n";
?>
Previous
Next
This oughta do it...
Regards
Joakim Andersson
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ay / month is reversed in MSSQL
$str_sql = "SELECT something FROM mytable WHERE LEFT(my_datetime, 10) = '" .
substr($form_date, 3, 2) . " " . substr($form_date, 0, 2) . " " .
substr($form_date, 6, 4) . "'";
Regards
Joakim Andersson
> -Original Mess
This doesn't look like a database question to me...
Anyway, try $_POST['variable_name'] if the variable comes from a form with
the POST-method
$_GET['variable_name'] - Form using GET-method or passing variables in the
URI (mypage.php?variable_name=42)
Regards
Joakim An
or());
?>
{$row['referer']}{$row['total_in_percentage']}";
}
?>
Regards
Joakim Andersson
> -Original Message-
> From: JJ Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 10, 2002 8:30 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB]
Does the user 'gn' exist?
Are you using the correct password?
Does that user have permissions on the database?
Hint: "Login failed for user 'gn'" suggests that there is something wrong
with that account...
Regards
Joakim Andersson
> -Original Message
26 matches
Mail list logo