Perad Posted September 27, 2006 Share Posted September 27, 2006 I have "timer" in a table called buttontimer has a number string in it. I want to request the number.I know i have to start with [code]require_once('mysql_connect.php');[/code]Could someone give me the other 1-2 lines please. Thanks a lot. Link to comment https://forums.phpfreaks.com/topic/22246-simple-query/ Share on other sites More sharing options...
acdx Posted September 27, 2006 Share Posted September 27, 2006 Read this:[url=http://php.net/manual/en/ref.mysql.php]http://php.net/manual/en/ref.mysql.php[/url]This wouldn't hurt either:[url=http://php.net/manual/en/function.require-once.php]http://php.net/manual/en/function.require-once.php[/url] ;)You first need to establish a connection to the mysql server using mysql_connect(). Then you select the correct database using mysql_select_db() and execute your query using mysql_query(). Then process its return variable using functions like mysql_fetch_assoc(). Finally close the connection with mysql_close(). Link to comment https://forums.phpfreaks.com/topic/22246-simple-query/#findComment-99622 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.