Jump to content

[SOLVED] SQL query error


MrBillybob

Recommended Posts

So the actual query is...

 

SELECT * FROM `eve_wallet` WHERE `refType` = 'variableoutput'

 

Seems fine to me. Personally though, I have had problems when using the ` `. I don't use those with my queries and they seem to run fine. Have you tried that? Otherwise, have you just tried the following:

 

$sql = 'SELECT * FROM `eve_wallet` WHERE `refType` = \'$in_refType\'';

 

Usually works for me...

swap

 

$sql = 'SELECT * FROM `eve_wallet` WHERE `refType` = \'' . $in_refType . '\'';

 

for

 

$sql = "SELECT * FROM `eve_wallet` WHERE `refType` = '" . $in_refType . "'";

 

I prefer double quotes AND concatenation on query strings - IMO its easier to read the code then!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.