hello,
when retrieving data from the db and displaying it on the
page by creation date how can i reverse the order so that the most
recent entry appears first? here's what i have now:
?
require(config.php);
$obj = mysql_db_query($dbname,select * from ads order by createdate);
?
Como faço para criar uma janela de popup em php?
O objectivo é ao abrir uma página com dados estatisticos abrir outra com gráficos.
xau
__
Rui Palma
ICQ#: 171381429
Current ICQ status:
+ More ways to contact me
May be some one could help me here, I am trying to retrieve results from a
table that gives 9 rows, from each row I am trying to pull out two fields
and assign the two values of those column fields to a variable $image1 and
$caption1, and now I want to go to the next row and pick up the values of
Hello, Newbie question.
And can the same SQL portion of the code be written something like...
query= UPDATE taablename SET (username, email, location)
VALUEs( $username, $email, $location);
Any reason why this Update command would not execute?
// BUILD AND EXECUTE QUERY TO SAVE USER INFO INTO
when retrieving data from the db and displaying it on the
page by creation date how can i reverse the order so that the most
recent entry appears first? here's what i have now:
?
require(config.php);
$obj = mysql_db_query($dbname,select * from ads order by
createdate);
?
You
Hi,
This is the problem I am having:
I have to extract data from MS SQL into MY SQL using PHP.
The MS SQL (puke!) runs on a (yuck!) MS Small Business Server.
It contains text fields that contain text with characters like ë, ö, é, è
(Dutch language).
The MY SQL used to run on Windows 2000. The
Simple MySQL.
After your ORDER BY clause use either ASC (I think this is the default) or
DESC. I'm pretty sure this'll work on date fields to produce the results you
want.
Your query will end up looking like:
...order by createdate DESC
-Original Message-
From: Addison Ellis
thank you... this worked. best, addison
Simple MySQL.
After your ORDER BY clause use either ASC (I think this is the default) or
DESC. I'm pretty sure this'll work on date fields to produce the results you
want.
Your query will end up looking like:
...order by createdate DESC
-Original
hello,
i do print_r($row); and all my data is printing properly from
my db. however, with the below code only one row is not printing:
{$row-property_type}
thank you for your time. addison
?
// Begin Ad Block
$count = 0;
$id = 45;
$obj = mysql_db_query($dbname,select a.*,s.name
i do print_r($row); and all my data is printing properly from
my db. however, with the below code only one row is not printing:
{$row-property_type}
thank you for your time. addison
?
// Begin Ad Block
$count = 0;
$id = 45;
$obj = mysql_db_query($dbname,select
UPDATE is for changing values in existing rows. It appears you want to
add new information. Use INSERT.
$query= INSERT tablename SET (username, email, location) VALUES(
$username, $email, $location);
Note that a WHERE condition is incorrect for INSERT.
Your UPDATE syntax is not correct either.
On Tuesday 04 February 2003 20:02, Geckodeep wrote:
May be some one could help me here, I am trying to retrieve results from a
table that gives 9 rows, from each row I am trying to pull out two fields
and assign the two values of those column fields to a variable $image1 and
$caption1, and now
If you want to use WHERE clause, see the
INSERT table
SELECT ...
syntax.
Extremely convenient. You inherit all the flexibility of the SELECT
statement.
Ignatius
- Original Message -
From: Doug Thompson [EMAIL PROTECTED]
To: Ike Austin [EMAIL
Hello, how can I activate the support for MySQL, because when I try to use
functions as mysql_connect or mysql_select_db I receipt this error message:
Call to undefined function...
Thank you very much,
Tom.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Tuesday 04 February 2003 21:31, Tomás Liendo wrote:
Hello, how can I activate the support for MySQL, because when I try to use
functions as mysql_connect or mysql_select_db I receipt this error message:
Call to undefined function...
It depends on how you installed php.
Searching archives
Here is a part of my code:
while ($image_row = mysql_fetch_array($result_images)){
$image1 = $image_row[0][image1];
if ($image1 == ){
$image1 = $folder.logo.jpg;// it
places a log when
$counter = 1;
$query = mysql_query(SELECT image,caption FROM tablename ORDER BY id;);
while($row = mysql_fetch_array($query))
{
$imagevar = image . $counter;
$captionvar = caption . $counter;
$$imagevar = $row[image];
$$captionvar = $row[caption];
$counter++;
}
Change the
thanks i m going to test ride it and let you know.
tks again to adam jason.
Adam Voigt [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
$counter = 1;
$query = mysql_query(SELECT image,caption FROM tablename ORDER BY id;);
while($row = mysql_fetch_array($query))
{
Just a quick correction... if the q part is static, I believe you
should use $(q$i) rather than ${$q . $i}
--- [EMAIL PROTECTED] wrote:
OK, now I get it:
$input = 'input type=hidden name=q' . $i . ' value=' .
${$q . $i} . ' . \n;
print($input);
This one isn't well known so
finally i got it to work in this manner.
$i=1;
while ($image_row = mysql_fetch_array($result_images)){
$image=image.$i;
$caption=caption.$i;
$$image = $image_row[image1];
if ($$image == ){
$$image = $folder.logo.jpg;
}
$$caption = $image_row[caption];
$i++;
}
great so thanks Adams.
GD
Daniel Joyce [EMAIL PROTECTED] wrote... :
Hello folks, I need help with the following. I'm recording machine
production and 'health' status information into a Oracle 9.2 DB. That's
working great, rock solid, great admin tools, etc.
I've been trying to use the Rockwell Software tools to
Have you correctly updated you web server's .ini file to point to the PHP
installation according to the PHP installation instructions?
-Original Message-
From: Tomas Liendo [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 10:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB]
I am working on an app that needs to post information to a website
based on date. The tricky part for me is that the date is a range that
spans either 2 or 3 days. I want the web page to dynamically populate
this
information based on a query. The query will look something like this:
WOW... I have never even heard of BETWEEN before. How does this
look to you?
SELECT StartDate, StopDate, LocationID FROM phpCalendar_Daily WHERE
CURDATE() BETWEEN StopDate AND StopDate
Would the query work like this? This would mean I don't even have
to care about the
Hi, need some help.
i will try to explain my self.
I have a sendmail in GNU/linux, and a radiator GNU/Linux with Mysql. I have
to give a diferente user for de dialup login and the sendmail, cause i can't
or i dont know a way to change the user and pass for the user in the two
servers. Like this,
Hi All,
Having a problem figuring out the logic of something here and hoping
someone can point me in the right direction.
I have 2 tables.
First table holds a listing of all Provinces and States. Here a brief of
what it looks like:
value label
AB Alberta
BC British
Seek out LEFT JOIN on mysql web site, thats what you want.
Cheers
Jason
-Original Message-
From: Aaron Wolski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 10:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] matching data from one table with another and
displaying results?
Solved the issue...
Just thought I'd post the query that did it.
$provinceQuery = db_query(SELECT * FROM ProvinceSelectTable AS t1,
OrderTable AS t2 WHERE t1.value=t2.province GROUP BY t2.province);
Thanks for any help thought to provide me :)
Aaron
-Original Message-
From:
I have a JOIN that is not working, and figured I would piggie-back on this
thread to see if someone could give me a quick answer... Here is the JOIN
syntax. This is my very first attempt at a JOIN statement, so I may be
doing something blatantly wrong here.
SELECT 'A.Title'
FROM
-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: 04 February 2003 14:38
Just a quick correction... if the q part is static, I believe you
should use $(q$i) rather than ${$q . $i}
Well, actually, I think you want ${'q'.$i} -- or even ${q$i}
Cheers!
Mike
Agata Report :: New version 4 beta 002
=
Where can I get ?
-
http://agata.codigolivre.org.br
Changes ?
Table Structure Tree and SQL Repository Tree have new features and new design. A new
directory structure is now used. The merge
This is more of an SQL question, but I am not sure where else to
turn for help. I am trying a JOIN, for the first time ever, and it is NOT
working for me. The following is what I am attempting;
SELECT 'A.Title'
FROM `phpCalendar_Daily` AS 'B'
JOIN 'phpCalendar_Details' AS 'A' ON
SELECT 'A.Title'
FROM `phpCalendar_Daily` AS 'B'
JOIN 'phpCalendar_Details' AS 'A' ON 'A.CalendarDetailsID' =
'B.CalendarDetailsID'
WHERE CURDATE( )
BETWEEN 'B.StartDate' AND 'B.StopDate'
Take out all of those quotes! You're making strings out of everything.
WHERE CURDATE() BETWEEN
Thanks... I was able to figure it out using what my book calls the
old method. Here is what ended up working for me:
SELECT B.Title FROM `phpCalendar_Details` AS B, `phpCalendar_Daily` AS A
WHERE A.CalendarDetailsID = B.CalendarDetailsID AND CURDATE( ) BETWEEN
A.StartDate AND
I have a start_date and a finish_date stored in a mysql db.
I want to check that today's date falls between these 2 dates.
Can I set up the 3 dates so that a simple subtraction can be done? eg
if (($today - $start 0) ($finish - $today 0)) {
...within range...
} else {
...out of range...
}
I'm having problem querying a table with a field value containing an
appostropy, please help. Using ODBC to connect MSAcess database.
$mQuery = CustomerID='$mCust';
$mCur2 = odbc_do( $mCnx, select Login from Emails where $mQuery );
When it hits O'Donald, James, I get error in
hello,
is there a limit to how many where statements one can
include in a query?
i am wondering if i can add this:
where createdate = subdate(now(),interval 1 month)
to this:
$obj = mysql_db_query($dbname,select a.*,s.name as
subcategory_name,c.name as category_name from ads a,subcategory
is there a limit to how many where statements one can
include in a query?
No...
i am wondering if i can add this:
where createdate = subdate(now(),interval 1 month)
to this:
$obj = mysql_db_query($dbname,select a.*,s.name as
subcategory_name,c.name as category_name from ads
I'm having problem querying a table with a field value containing an
appostropy, please help. Using ODBC to connect MSAcess database.
$mQuery = CustomerID='$mCust';
$mCur2 = odbc_do( $mCnx, select Login from Emails where $mQuery
);
When it hits O'Donald, James, I get error in
I have a start_date and a finish_date stored in a mysql db.
I want to check that today's date falls between these 2 dates.
Can I set up the 3 dates so that a simple subtraction can be done? eg
if (($today - $start 0) ($finish - $today 0)) {
...within range...
} else {
...out of
Replying to my own post
Well, I got it working, using oci8. But if OCI8 works, then so should ADODB.
I'll write up a post tomorrow on getting PHP and Oracle to talk under
NT/2000.
-Daniel
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
SELECT B.Title FROM phpCalendar_Details AS B, phpCalendar_Daily AS A
WHERE A.CalendarDetailsID = B.CalendarDetailsID AND CURDATE( ) BETWEEN
A.StartDate AND A.StopDate
Also, you don't need to use the backticks around field names unless they contain
spaces or other reserved words and
Hi there.
Im making a kind of a messageboard and trying to save some time with the querys but i
cant get it to work properly.
I have two tables, one with some users and one with messages.
Table : users
+--++
| username | id |
+--++
| user1| 1 |
| user2| 2 |
|
Hello all,
I'm a graphic designer making a site for giving tutorials, but since i'm just a newbie
in coding, tons of problems have fallen on me.
This is my photoshop_tutorial table structure
id int not null auto_increment,
title varchar(255) not null,
author varchar(55) not null,
On Wednesday 05 February 2003 12:50, Le Hoang wrote:
// Add 1 view to the view column
$v = $row[view];
$vplus = $v+1;
$view = mysql_query(update photoshop_tutorial where id=$id set
view=$vplus); // Problem here!
You should ALWAYS check the result of a call to mysql_query():
if ($view
Dear Sir/Madam,
(B I have create table for reservation system in that table i need to save
(Ball the values
(Bbut it couldn`t save all the values it saves only the last value.
(B Please help me!
(B html
(B?php
(Bif($submit)
(B{
(B$db = mysql_connect("localhost", "kumar","");
Dear Sir/Madam,
(BI have created reservation table i need to store all the values in
(Bdatabase when i click the submit button
(Bbut it couldn`t working.
(B/*
(BMaster3.php
(B*/
(BHTML
(B?php
(Bif($submit)
(B{
(B$db = mysql_connect("localhost", "kumar","");
On Wednesday 05 February 2003 15:03, kumar wrote:
(B
(B I have created reservation table i need to store all the values in
(B database when i click the submit button
(B but it couldn`t working.
(B
(BCould you give a detailed description of HOW it isn't working?
(B
(BWhat did you
48 matches
Mail list logo