feeleash Posted September 11, 2007 Share Posted September 11, 2007 Hey there I'm a total noob as it comes to php and mssql. I have created barely an artists database where i've placed three values/rows name,surname and image. i have set pk the artist's surname because that is how i want them to be shown/sorted in a php drop menu. for the images i've placed image urls. Now i don't know how to make a php page that would retrieve data from my base and show it in the browser! I want simple stuff (although when I read couple of tuts, it made my brain hurt ). Just a php page where the user will select from a drop down a letter (surname LIKE 'A%' I guess?) and then in the second drop down the artist's name and surname which will display the image (using the url from the database) below. I hope I didn't confuse you with this description Thank you fro reading this, Mike. Quote Link to comment https://forums.phpfreaks.com/topic/68929-php-to-mssql/ Share on other sites More sharing options...
teng84 Posted September 12, 2007 Share Posted September 12, 2007 read http://w3schools.com/php/php_mysql_connect.asp Quote Link to comment https://forums.phpfreaks.com/topic/68929-php-to-mssql/#findComment-346485 Share on other sites More sharing options...
Fadion Posted September 12, 2007 Share Posted September 12, 2007 We will need to read a book or a detailed tutorial to get the idea of communicating with mysql from php. Anyway to extend what teng84 said, u basically need these functions to work with mysql mysql_connect - To connect to the mysql server mysql_select_db - To select the database u are going to work mysql_query - To run queries mysql_fetch_array - To get the returned data from a select statement and pass them in an array. U can consider other variants like mysql_fetch_object or mysql_fetch_assoc. Take a look at those functions and thei respective examples to have an idea. Quote Link to comment https://forums.phpfreaks.com/topic/68929-php-to-mssql/#findComment-346526 Share on other sites More sharing options...
Barand Posted September 12, 2007 Share Posted September 12, 2007 To work with mssql the functions are (almost) all identical if you substitute "ms" for "my" in the above functions. A common exception is error reporting. To report an error in a mysql query use "mysql_error()", but for mssql the function is "mssql_get_last_message()". Quote Link to comment https://forums.phpfreaks.com/topic/68929-php-to-mssql/#findComment-346533 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.