Reply to Selecting a row by value.. getting errors..

Your name:

Reply:


Posted by Mwahahahahaaahaa on 12/09/06 01:07

Hello all.. here is a snippet of some code that I'm going to try and
use. My DBASE is as follows

Table name = "2006"
The columns are: month | start | days | etc....
Now I want to be able to log into the dbase/table and retrieve
information on the row based on the month. I login to the table fine,
but get an error on the QUERY. "Check the manual that corresponds to
your MySQL server version for the right syntax to use near '2006 WHERE
month = 'dec'' at line 1". I've tried it different ways.. originally
with variables, and then tried it as a solid string to see if I was
making a mistake. If anyone could point me in the right direction I
would GREATLY appreciate it!!!

//P.S. the variable $Table = "2006"
// and $selField = "dec"

mysql_connect("localhost", $User, $Pass) or die(mysql_error());
mysql_select_db($dBase) or die(mysql_error());


//$queryString = "Select * FROM '" . $Table . "' WHERE 'month' LIKE " .
$selField;
$queryString = "SELECT * FROM 2006 WHERE month = 'dec' ";
$result = mysql_query($queryString) or die(mysql_error());

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация