Current location: Hot Scripts Forums » Programming Languages » PHP » clarification regarding PHP-MYSQl


clarification regarding PHP-MYSQl

Reply
  #1 (permalink)  
Old 02-28-06, 12:01 AM
plumberg plumberg is offline
New Member
 
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
clarification regarding PHP-MYSQl

Hi,

This seems to be a great place. Hope to get some clarifications of doubts that I have....

1. In Oracle, we have "select * from dual", a temporary table. Does Mysql Also support any such formation?

2. In Oracle, we have "select count(1) from dual v/s Select count(*) from dual". Any efficient way to count number of rows returned in MYSql?

3. I have an master table of Products (product id, product name), identified uniquely by a product ID. Now, i haves some orders associated with the products. Tomorrow, I modify the Product name, i believe all references will be affected. I want to know a mechanism which would allow usage of OLD Product name and New Product name.. ie. for all transactions with OLD Product name, they should be referred with the old name, however, new transactions for same product should be associated with NEW Name.. how can we associate them.. any date usage required???... Hope I am not too confusing..

4. How can we store the UNIX Timestamp in MYSQL and then, retrieve it for comparision?

Hope to receive the replies to the above queries soon. Thanks for the gr8 site once again.

-Calvin P
Reply With Quote
  #2 (permalink)  
Old 03-02-06, 09:50 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
hi,

i have answers for the first two questions.

1. yes you can use practicly the same syntax in MySQL:
"SELECT * FROM yourtable"
2. yes, same as with 1:
this one counts the total number of entries:
"SELECT count(*) FROM yourtable"
this one counts the selected entries of a query:
mysql_num_rows(mysql_query($query));

the third, i didn't understand quite well
and the fourth i don't know: i tried mysql.com, but no results

Greetz,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
Need help with some php mysql TheTinkeringToad PHP 9 02-01-06 10:56 AM
IIS MYSQL and PHP nommiiss PHP 6 01-31-06 04:30 PM
RESELLER WEB HOSTING - $9.99/MONTH For 4GB HD & 30GB BW! CPanel, PHP, MySQL & MORE! IncognitoNet General Advertisements 0 07-28-05 01:38 PM
PHP multi-dimensional array sorting issue aqw PHP 2 06-24-05 11:09 PM


All times are GMT -5. The time now is 06:35 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.