Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #10215

Re: Query with PHP and MySql

From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.php
Subject Re: Query with PHP and MySql
Date 2013-07-26 09:32 +0000
Organization A noiseless patient Spider
Message-ID <kstfmt$msm$2@dont-email.me> (permalink)
References <09d59ae6-8f3a-45e5-9a3c-7ac9f63f282b@googlegroups.com>

Show all headers | View raw


On Thu, 25 Jul 2013 23:06:58 -0700, Manju Bishnoi wrote:

> Please do reply as soon as possible.

Hi

You haven't given us anywhere near enough information to determine if 
this is:

a) A problem with your php.
b) A problem with your sql.

The role of php in an system like yours is limited to taking data from 
the web forms, assembling it into sql queries, calling the sql daemon to 
process those queries, and then presenting the results of the queries 
back to the web user.

The most common problem[1] is assembling invalid sql statements. That is 
an sql problem, and you need to work out what the correct sql is.

To test this, you need to check out the sql error handling features for 
the php interface to mysql that you're using, and see what errors you are 
getting. You then need to analyse the sql that you are generating, 
probably with reference to the table definitions, to see why it is 
generating those errors.

You also need to check whether you are getting php execution errors that 
might be causing the invalid sql to be generated, or even preventing the 
database calls happening. To do this, you need to enable appropriate php 
error logging and check the relevant log files.

I have no experience of wamp, so I have no idea where to look for the 
relevant log or configuration files on your system, or what the optimum 
settings are for debugging. Sorry that I can't help any further.

[1] It seems to me, anyway, that most people coming here with a php / sql 
problem are generating broken sql with valid php code, rather than having 
php specific issues. Similar to those people who blame php for their 
broken webpages when the problem is that they're telling php that 
generate invalid / broken html. The php is just doing what they tell it 
to.

-- 
Denis McMahon, denismfmcmahon@gmail.com

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Query with PHP and MySql Manju Bishnoi <manjubishnoi09@gmail.com> - 2013-07-25 23:06 -0700
  Re: Query with PHP and MySql The Natural Philosopher <tnp@invalid.invalid> - 2013-07-26 09:21 +0100
  Re: Query with PHP and MySql Denis McMahon <denismfmcmahon@gmail.com> - 2013-07-26 09:32 +0000
  Re: Query with PHP and MySql Jerry Stuckle <jstucklex@attglobal.net> - 2013-07-26 07:00 -0400
  Re: Query with PHP and MySql Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-27 09:41 +0200
  Re: Query with PHP and MySql Luuk <luuk@invalid.lan> - 2013-07-27 09:53 +0200

csiph-web