|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Using PHP- running BASIC mySQL script
I need to run this code in a PHP document to copy a record from one table to another... I also need to find out how to select the LAST RECORD in the table.
INSERT INTO `ruidoso_ActionSki`.`0203` SELECT ???lastRecord??? FROM `ruidoso_ActionSki`.`Reservations` ANY HELP WOULD BE APPRECIATED Thanks COLE |
|
#2
|
|||
|
|||
|
RE: Using PHP- running BASIC mySQL script
proper syntax is
$query="INSERT INTO table_name VALUES ('value1','value2')"; $result=mysql_query($query)or die(error message); once that is inserted you can use $last_id=mysql_insert_id($result); |
|
#3
|
|||
|
|||
|
RE: Using PHP- running BASIC mySQL script
Thanks worked like a charm - I guess that I should just read the docs to figure out how to move to the last record with the SQL
THANKS!! Cole |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Using PHP- running BASIC mySQL script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|