Why Register With OSV?

Join 5700+ of your peers

Get enriched. Access 1270+ quality tutorials right away on:

  • Joomla 2.5.X, 3.0.X
  • WordPress 3.5.X
  • Shopping Carts
  • E-Commerce Payment Gateways
  • PDFs for each tutorial - FREE for download
  • New topics and tutorials added weekly

FREE EBooks

FREE Templates

Member Login

Not a member yet? Sign Up!

Opensourcevarsity Logo
Tutorials & Training from experienced world class trainers
Welcome, Guest
Username Password: Remember me

Feedback from MySQL
(1 viewing) (1) Guest
All your queries regarding
MySQL Installation,
Learning MySQL DBA,
and tonnes more... will be solved in this forum
  • Page:
  • 1

TOPIC: Feedback from MySQL

Feedback from MySQL 2 years, 10 months ago #63

  • sami
  • OFFLINE
  • Senior Boarder
  • Posts: 58
  • Karma: 0
Hi..
How can I receive feedback from MySQL when my PHP encounters a problem?

Re:Feedback from MySQL 2 years, 10 months ago #69

  • abraham
  • OFFLINE
  • Senior Boarder
  • Posts: 58
  • Karma: 0
When you are working with PHP and MySQL and encounter an error, it is helpful to receive more detailed information regarding the problem.

You can use the mysql_error ( ) to get feedback from MySQL to your PHP document if you are encountering problems.

It is phrased as: mysql_error ( [link_identifier] ).

Hope this help you.

Re:Feedback from MySQL 2 years, 10 months ago #73

  • sami
  • OFFLINE
  • Senior Boarder
  • Posts: 58
  • Karma: 0
Thanks for the help.. but it would be very helpful if you can explain me how to utilize mysql_error()?

Re:Feedback from MySQL 2 years, 10 months ago #79

  • kate
  • OFFLINE
  • Expert Boarder
  • Posts: 92
  • Karma: 0
The following Example might help you in understanding mysql_error():

mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error())

This will return an error if there is a problem connecting to your MySQL database

$value = mysql_query($your_query) or die("A MySQL error has occurred.<br />
Your Query: " . $your_query . "<br />
Error: (" . mysql_errno() . ") " . mysql_error())

When you encounter an error, this will return your custom message (A MySQL error has occurred.<br />) followed by a line number, and the actual error.
  • Page:
  • 1
Time to create page: 1.95 seconds
O-S-V Free Templates

FREE HTML / Joomla / WordPress Templates For Download
Registration Required

CONNECT WITH US

Sitemap   |   Privacy Policy   |   MySQL(70)   |   Disclaimer   |   Reach Out To Us
Designed by Ivan Bayross & Meher Bala | Powered by Joomla
© 2013 All Rights Reserved.