Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using PHP to insert a record in MSSQL 1

Status
Not open for further replies.

Garabaldi

Technical User
Joined
Jan 16, 2002
Messages
61
Location
CA
Folks,

I'm having issues getting php to update a table in Sql server 7...

This is my code so far:

$sqlInsertName = "INSERT INTO Person1
([Name],[Age],[Birthday],[Age_tester])
VALUES ('$Name','$Age','$Birthday', '$Age_test')";
mssql_execute($sqlInsertName)

Does anyone know the proper way to do this?

Thanks,
 
The issue i am having is that it is not updating the table... I keep getting an error stating that mssql_execute() is not valid...

The sql portion is correct. I just need to figure out the command in php that will execute it.

Thanks,
 
You mean that PHP is saying the function does not exist?

mssql_query() is documented here:
but the manual says it is for stored procedures. You might try mssql_query(), the documentation for which you can find from the link above.

Want the best answers? Ask the best questions: TANSTAAFL!
 
Thanks very much for your help... mssql_query() seems to have been the ticket.

Thanks again.
 
no... actually it didn't... i'm a relatively new user to php... done all my previous scripting in asp so i had no idea what to use to execute the function... I'm a bozzo and I don't care...
 
uhhh... nu- - nuthing... *whispers to the voices in his head to shut up*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top