learnerphp.blogspot.com
Php Consultant: MySQL Function Reference contd..
http://learnerphp.blogspot.com/2008/10/mysql-function-reference-contd.html
Wednesday, October 22, 2008. MySQL Function Reference contd. String mysql error ([ resource $link identifier ] ). The MySQL connection. If the link identifier is not specified, the last link opened by mysql connect() is assumed. If no such link is found, it will try to create one as if mysql connect() was called with no arguments. If by chance no connection is found or established, an E WARNING level error is generated. Int mysql errno ([ resource $link identifier ] ). From operating systems to multimedi...
learnerphp.blogspot.com
Php Consultant: September 2008
http://learnerphp.blogspot.com/2008_09_01_archive.html
Friday, September 12, 2008. Example 4 file reading. Line = fgets($fh); / read a complete line from file. Echo $line; / render that line as HTML text. Fh = fopen("myfile1.txt", "r");. Str = fgets($fh, 64); / read only 64 characters from the file. Echo $str; / render 64 characters as HTML. Line2 = fgets($fh, 64); / read next 64 characters from the file. Reading line by line:. Fh = fopen("myfile1.txt", "r");. Line = fgets($fh);. Reading all lines at once: [Using function file get contents()]. Filename - the...
learnerphp.blogspot.com
Php Consultant: January 2009
http://learnerphp.blogspot.com/2009_01_01_archive.html
Sunday, January 11, 2009. 160;is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works. After that, check out the online manual, and the example archive sites and some of the other resources available in the links secton. Subscribe to: Posts (Atom). Page-rank10.com - PageRank10 Experiment.
learnerphp.blogspot.com
Php Consultant: Querying data from a table code
http://learnerphp.blogspot.com/2008/10/querying-data-from-table-code.html
Wednesday, October 22, 2008. Querying data from a table code. Make a MySQL Connection. Mysql connect("localhost", "admin", "1admin") or die(mysql error() ;. Mysql select db("test") or die(mysql error() ;. Retrieve all the data from the "example" table. Result = mysql query("SELECT * FROM example"). Or die(mysql error() ;. Store the record of the "example" table into $row. Row = mysql fetch array( $result );. Print out the contents of the entry. Echo "Name: ".$row['name'];. Echo " Age: ".$row['age'];.
learnerphp.blogspot.com
Php Consultant: February 2009
http://learnerphp.blogspot.com/2009_02_01_archive.html
Tuesday, February 24, 2009. Subscribe to: Posts (Atom). Page-rank10.com - PageRank10 Experiment.
learnerphp.blogspot.com
Php Consultant: MySQL Function Reference example code
http://learnerphp.blogspot.com/2008/10/mysql-function-reference-example-code_22.html
Wednesday, October 22, 2008. MySQL Function Reference example code. Mysql select db("database", $link);. Result = mysql query("SELECT * FROM table1", $link);. Num rows = mysql num rows($result);. Echo "$num rows Rows n";. Result = mysql query("SELECT id,email FROM people WHERE id = '42'");. Echo 'Could not run query: ' . mysql error();. Returns 2 because id,email = = two fields */. Echo mysql num fields($result);. Subscribe to: Post Comments (Atom). Querying data from a table code.
learnerphp.blogspot.com
Php Consultant: MySQL Function Reference example code
http://learnerphp.blogspot.com/2008/10/mysql-function-reference-example-code_5711.html
Wednesday, October 22, 2008. MySQL Function Reference example code. Die('Could not connect: ' . mysql error() ;. 11;mysql select db('mydb');/* this should return the correct numbers of deleted records */mysql query('DELETE FROM mytable WHERE id . Printf("Records deleted: %d n", mysql affected rows() ;. 160;with a where clause that is never true, it should return 0 */mysql query('DELETE FROM mytable WHERE 0');. Printf("Records deleted: %d n", mysql affected rows() ;. Subscribe to: Post Comments (Atom).
learnerphp.blogspot.com
Php Consultant: MySQL Function Reference contd..
http://learnerphp.blogspot.com/2008/10/mysql-function-reference-contd_22.html
Wednesday, October 22, 2008. MySQL Function Reference contd. Resource mysql db query ( string $database , string $query [, resource $link id] ) . Selects a database, and executes a query on it. The name of the database that will be selected. Returns a positive MySQL result resource to the query result, or FALSE on error. Subscribe to: Post Comments (Atom). Querying data from a table code. Inserting data into a table code. MySQL Function Reference example code. MySQL Function Reference example code.
learnerphp.blogspot.com
Php Consultant: MySQL Function Reference contd..
http://learnerphp.blogspot.com/2008/10/mysql-function-reference-contd_2533.html
Wednesday, October 22, 2008. MySQL Function Reference contd. Int mysql num rows ( resource $result ). Retrieves the number of rows from a result set. This command is only valid for statements like SELECT or SHOW that return an actual result set. To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query, use mysql affected rows(). The result resource that is being evaluated. The number of rows in a result set on success, or FALSE on failure. Subscribe to: Post Comments (Atom).