[PHP-DB] date: reverse order

2003-02-04 Thread Addison Ellis
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); ?

[PHP-DB] Popup

2003-02-04 Thread Rui Miguel Palma
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

[PHP-DB] Storing iterated results into various variables

2003-02-04 Thread Geckodeep
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

[PHP-DB] update

2003-02-04 Thread Ike Austin
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

Re: [PHP-DB] date: reverse order

2003-02-04 Thread 1LT John W. Holmes
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

[PHP-DB] problem with charsets mssql/mysql php

2003-02-04 Thread Filip De Graeve
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

RE: [PHP-DB] date: reverse order

2003-02-04 Thread Hutchins, Richard
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

RE: [PHP-DB] date: reverse order

2003-02-04 Thread 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

[PHP-DB] print_r($row);

2003-02-04 Thread Addison Ellis
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

Re: [PHP-DB] print_r($row);

2003-02-04 Thread 1LT John W. Holmes
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

Re: [PHP-DB] update

2003-02-04 Thread Doug Thompson
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.

Re: [PHP-DB] Storing iterated results into various variables

2003-02-04 Thread Jason Wong
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

Re: [PHP-DB] update

2003-02-04 Thread Ignatius Reilly
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

[PHP-DB] How activate the support for MySQL?

2003-02-04 Thread Tomás Liendo
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:

Re: [PHP-DB] How activate the support for MySQL?

2003-02-04 Thread Jason Wong
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

Re: [PHP-DB] Storing iterated results into various variables

2003-02-04 Thread Geckodeep
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

Re: [PHP-DB] Storing iterated results into various variables

2003-02-04 Thread Adam Voigt
$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

Re: [PHP-DB] Storing iterated results into various variables

2003-02-04 Thread Geckodeep
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)) {

Re: [PHP-DB] Re: problems with variables

2003-02-04 Thread Mark
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

Re: [PHP-DB] Storing iterated results into various variables

2003-02-04 Thread Geckodeep
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

Re: [PHP-DB] Oracle 9.2 + IIS 5.0 + Win2k server + PHP 4.3 + ADODB 3.10

2003-02-04 Thread Maxim Maletsky
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

RE: [PHP-DB] Help!

2003-02-04 Thread Hutchins, Richard
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]

Re: [PHP-DB] Date Range Question...

2003-02-04 Thread 1LT John W. Holmes
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:

RE: [PHP-DB] Date Range Question...

2003-02-04 Thread NIPP, SCOTT V (SBCSI)
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

[PHP-DB] HELP, sendmail + mysql.

2003-02-04 Thread Bruno Pereira
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,

[PHP-DB] matching data from one table with another and displaying results?

2003-02-04 Thread Aaron Wolski
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

RE: [PHP-DB] matching data from one table with another and displaying results?

2003-02-04 Thread SELPH,JASON (HP-Richardson,ex1)
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?

RE: [PHP-DB] matching data from one table with another and displaying results? SOLVED

2003-02-04 Thread Aaron Wolski
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:

RE: [PHP-DB] matching data from one table with another and displaying results?

2003-02-04 Thread NIPP, SCOTT V (SBCSI)
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

RE: [PHP-DB] Re: problems with variables

2003-02-04 Thread Ford, Mike [LSS]
-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

[PHP-DB] Agata Report :: New Version 4 beta 002

2003-02-04 Thread Pablo Dall'Oglio
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

[PHP-DB] A little JOIN help please...

2003-02-04 Thread NIPP, SCOTT V (SBCSI)
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

Re: [PHP-DB] A little JOIN help please...

2003-02-04 Thread 1LT John W. Holmes
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

RE: [PHP-DB] A little JOIN help please...

2003-02-04 Thread NIPP, SCOTT V (SBCSI)
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

[PHP-DB] How to check that today's date is within a given range

2003-02-04 Thread Barrie Matthews
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... }

[PHP-DB] odbc query with single quote in string

2003-02-04 Thread Squirrel User
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

[PHP-DB] where limits?

2003-02-04 Thread Addison Ellis
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

RE: [PHP-DB] where limits?

2003-02-04 Thread John W. Holmes
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

RE: [PHP-DB] odbc query with single quote in string

2003-02-04 Thread John W. Holmes
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

RE: [PHP-DB] How to check that today's date is within a given range

2003-02-04 Thread John W. Holmes
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

[PHP-DB] Re: Oracle 9.2 + IIS 5.0 + Win2k server + PHP 4.3 + ADODB 3.10

2003-02-04 Thread Daniel Joyce
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:

RE: [PHP-DB] A little JOIN help please...

2003-02-04 Thread Adam Royle
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

[PHP-DB] Problem with JOIN

2003-02-04 Thread Håkan Larsson
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 | |

[PHP-DB] UPDATE doesn't work

2003-02-04 Thread Le Hoang
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,

Re: [PHP-DB] UPDATE doesn't work

2003-02-04 Thread Jason Wong
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

[PHP-DB] inserting datas through table

2003-02-04 Thread kumar
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","");

[PHP-DB] inserting datas through table

2003-02-04 Thread 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","");

Re: [PHP-DB] inserting datas through table

2003-02-04 Thread Jason Wong
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