Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




PHP Saying Error In Mysql Syntax, But Written My Mysql Query Browser!


I have a basic db that I access with MySQL query browser. Everything
seems fine to me but I am using this db as part of a php shopping
basket and when I try to add an item I get:

Notice: Query failed: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '>function.extract]: First argument should be an
array in functions.inc.php on line 31
Notice: Undefined variable: price in functions.inc.php on line 36
Notice: Undefined variable: price in functions.inc.php on line 39
Notice: Undefined variable: total in unctions.inc.php on line 39

I'm assuming the last three are caused by this problem as price should
be passed to the cart, and total is worked out using it. However
although I know mySQL code it was the MySQL query browser that
actually generated the code and I cannot see a way to view or debug
the code.

The db has one table in it which is made up of id, name, subname,
desc, and price.

The code in the php file that is being referred to is:




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Query Syntax In MySQL Does Not Work In PHP Code
I have a syntax issue. I produced a query in MyCC that pulled the data from a MySQL table perfectly the way I wanted, but when I put it into my webpage code in PHP the syntax of having a beginning quotation mark causes the value quotation marks (in red) to not group properly.

The query pivots the data in one column so that the data creates one column for each of the corresponding values in the first column. (With help from the MySQL Wizard tutorial).

Here is the code the way it should be: PHP Code:

Find A List Of The Mysql Query Syntax?
Where would I find a list of the mysql query syntax?

Mysql / PHP : Syntax Error
for php syntax when i call Mysql database

I have wrote that and my sql connection is working

I just have a problem with this command line :

$query = "SELECT * FROM utilisateurs WHERE
pseudo_utilisateur='$login'";
$acces = mysql_query($query);

Mysql Syntax Error
what is wrong with this statemnet: $query = 'SELECT * FROM products WHERE id = '.$id.' AND boy = '.$boyGirl.' OR girl = '.$boyGirl; what do i do to fix it?

Php - Update Mysql Database - Syntax Error
When i try and update the database table i get this error.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc='My name is ***** and I'm a 17-yr. old junior. I play electric ba' at line 1

what i am doing is having the user fill in a large text area and saving it to a database. So i think the problem could possibly be that they are using ' and " in textarea to mess it up? Code:

Cannot Parse Php In Browser, Syntax Error
I'm getting started with PHP, and I'm got a simple database in MySQL and using php to display information from it. I have a script where I'm trying to display the following:

-first name
-last name
-address

When I parse the file with VIM, I get a syntax error line 20, but I'm not able to see/find my error. PHP Code:

Error Performing Query: You Have An Error In Your SQL Syntax Near
I have a query which pulls user info from a database table, and displays it in an HTML table. The user then has the ability to edit this data on the next page by clicking continue, where the first and last name are passed as variables, and are listed as uneditable, whereas all the other fields are able to be edited through a simple form.

Here's my problem, on the final page where the actual database UPDATE occurs, I'm getting a SQL error that looks like this
---------
Error performing query: You have an error in your SQL syntax near 'WHERE first_name='Joe' AND last_name='Schmoe' SET street_address_1='real address' at line 1
----------

It looks like its passing the first and last name fine (through hidden inputs), yet when I start to pass the edited fields as variables, it cuts off for some reason. The actual full value that I entered for "street_address_1" was "real address 333". It looks like it cut off after the "address", and didnt even bother to send the other 8 fields.

My code on the processing page looks like this
----------
$street_address_1_update=$_POST['street_address_1_update'];
$street_address_2_update=$_POST['street_address_2_update'];
$city_update=$_POST['city_update'];

$sql ="UPDATE mailing_list WHERE first_name='$first_name_update' AND last_name='$last_name_update' SET street_address_1='$street_address_1_update' street_address_2='$street_address_2_update' city='$city_update'"
----------
I only included 3 fields for brevity's sake. The rest pass the same way as these three. Again, the first and last names are simply passed as hidden inputs through the form.
Anybody have any clue what might be causing this? I know the error is a SQL one, but I may not be passing the variables correctly in PHP.

ERROR 2013: Lost Connection To MySQL Server During Query
I periodically recieve the following error from my MySQL server. "ERROR 2013: Lost connection to MySQL server during query" The server load is always very low (0.06). I can't figure out why I am getting these errors. Here is an extened status report from MySQL.
+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 5 |
| Aborted_connects | 340 |
| Created_tmp_tables | 2 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 25306 |
| Handler_read_first | 23 |
| Handler_read_key | 60061392 |
| Handler_read_next | 40329034 |
| Handler_read_rnd | 3588071416 |
| Handler_update | 33411189 |
| Handler_write | 433799 |
| Key_blocks_used | 7822 |
| Key_read_requests | 485870614 |
| Key_reads | 5508 |
| Key_write_requests | 536763 |
| Key_writes | 103759 |
| Max_used_connections | 152 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 125 |
| Open_files | 84 |
| Open_streams | 0 |
| Opened_tables | 287 |
| Questions | 76301760 |
| Running_threads | 87 |
| Slow_queries | 55 |
| Uptime | 2499787 |
+--------------------------+------------+

MySQL Error - Supplied Argument Is Not A Valid MySQL-Link Resource
I am getting the error

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/server7/public_html/71/arranholloway/database4.php on line 7

I tested my code on local computer and there were no problems, the error message only appeared when I loaded it onto my web hosters server. I'm new to PHP so its probably something simple but any help would be appreciated.

Mysql Syntax
sorry to cross post this, but i know most of you at least dabble with mysql, and this forum seems a bit more active than the mysql one so here goes...

This is what i'm trying to do.....
IF EXISTS (tablename)
#update some fields
ELSE
CREATE TABLE tablename(
#fields
);
INSERT INTO tablename all the values i need.

Seems straight forward, but can't figure it out

Tried every permutation of IF TABLE EXISTS and also tried
IF EXISTS (SELECT * FROM tablename)
but they both give errors.

Thanx for any help with this one, it's driving me nuts.

An OR In The Mysql WHERE Syntax
I have this right now:
SELECT title, COUNT(*) as numissues FROM comics WHERE type ='Comic Book' GROUP BY title"

But I need something like:
SELECT title, COUNT(*) as numissues FROM comics WHERE type ='Comic Book OR IS NULL' GROUP BY title"

The second line doesn't work. How would I get it to select where IS NULL and also Comic Book?

Mysql Syntax?
What would be the syntax of a mysql query when I want to pull the id and another specific column in a row. example:

$sql = 'SELECT * FROM products WHERE id = '.$id.', boy = '.$_POST["boyGirl"];

right now I get this error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' boy =' at line 1 SQL: SELECT * FROM products WHERE id = 5, boy = in /home/realfina/public_html/thediaperbakery/inc/mysql.class.php on line 107

Every Database-query Written In The Script Generate A New Thread ?
Can someone help me out?
I would like to know does every database-query written in the script generate a new thread ?
if yes,Does READ LOCAL option for locking table would allow the query written in same script to insert in the table locked with
READ LOCAL.

Mysql UPDATE Syntax
what is wrong with this code? It generates no erros, but doesn't work either:

$query = "UPDATE $usertable SET dl=dl+1 WHERE id=$id";
$result = MYSQL_QUERY($query);

There is a unique id number for every row in my table. There is also a column called "dl" which holds the number of downloads certain files have gotten. I'm trying this code on my download page so that every time someone downloads a file (identified by its id number) the "dl" column for that file is incremented.

Mysql JOIN Syntax
I am trying to JOIN two tables together using the common column "Username". My code is ECHOing all of rows of column "title". I want to just ECHO the column "title" rows that are specific to the "Username".

example: I have a user named "ballhogjoni". This username is stored in a table named 'users' and in a table named 'products' under the column "Username". There is a "Username" column in each table. Code:

PHP MYSQL Insert Syntax
$q = "INSERT INTO downloads (sub, title, name, email, link, date, description, pic)
VALUES ('$c', '$t', '$n', '$e', '$l', 'NOW()', '$d', 'NULL')";
$addinfo = mysql_query($q);

Does that look right?  I don't have many resources for php and mysql.

Mysql Update/replace Syntax
To keep track of how many fruits my visitors buy, I use a mySQL database
(2 columns: "fruit" and "quantity")....so can we make these following
mySQL queries work somehow?

(visitor buys 5 apples):
replace into fruit_database set fruit = 'apple' , quantity = quantity +
5;

(visitor buys 7 apples):
replace into fruit_database set fruit = 'apple' , quantity = quantity +
7;

(visitor buys 1 grape):
replace into fruit_database set fruit = 'grape' , quantity = quantity +

MYSQL CASE Statement Within PHP Syntax Or Correct Quoting ?
I'm trying to use a MySQL "CASE" statement within PHP to develop a conditional query. The query runs fine within from the MySQL command prompt with the "case" statements. And the PHP code works fine when I remove the lines that begin with "case". However when I run the query as listed below within my PHP code i get the following:


[Fri Apr 20 22:15:24 2007] [error] [client 10.188.50.74] PHP Parse error:  parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /srv/www/htdocs/mysql-learn/acetrack-post.php on line 68, referer: http://webserver1/mysql-learn/acetrack-post.html


< code snip >

$query  ="
SELECT
   acetitle, tracking_no, aceamt,
      case when (To_days(curdate()) - To_days(create_date)) >= 90 Then pototalamt else "" end   as  "90past" ,
      case when (To_days(curdate()) - To_days(create_date)) < 90 and (To_days(curdate()) - To_days(create_date)) > 30 Then pototalamt else "" end  as "30-90past"
     FROM Purtable t
LEFT JOIN acelog a
ON ace=acenum
WHERE ace='0220'
         GROUP by po ASC
         ";

   $result = mysql_query($query);

< /code snip >


Thanks in advance for any help.

PHP + MySql Timing Out In My Browser
I'm trying to run a php script written by someone else, not me, and it's
getting stuck in a particular step. Actually it isn't getting stuck per se,
but the browser is, because it's taking forever to return the results back
to the browser.

Here's the line that's responsible for this:

$users = $db->query_return_array("SELECT * FROM user");

It's getting stuck because in my database I have over 60,000 records. Now,
I'm just wanting to get over this step (it's an upgrade script), not looking
for fancy proper methods of php coding.

What alternative ways are there for me to prevent the browser from timing
out? I'm guessing some way of looping through the records, and updating the
client with simple update characters to prevent it from timing out.

Getting IP And Browser Information Into MySQL Database
I created a very simple form and a MySQL database to see if I could get the information submitted from the form to the database, and also a copy of the form submission emailed to me. I have managed to do that with the help of a few online tutorials.

Now, I would like to collect the IP address and browser type of the person submitting the form and have this information transferred to my MySQL database, along with the other form field information. I would like this information to be submitted to columns in my MySQL database labeled "ip" and "browser" respectively. Code:

PHP Update Query Mysql: Query Succussful?
I can't seem to successfully test an update query. Below is a piece of code that updates a statistics table. If row today doesn;t exist, a new day must be created. But this doesn't work...

thank you for your reply.

$today= date("Y-m-d");

$qq="update totals_r set hits_r=(hits_r+1), lang_$lang=(lang_$lang+1), cat_$cat=(cat_$cat+1), rating_$rating=(rating_$rating+1), bussite_$bussite=(bussite_$bussite+1) where date='$today'";

$result_6 = mysql_query ("$qq");

if (!$result_6){ /// IF !ROW_TODAY ==> CREATE NEW DAY

$qq_2="insert into totals_r (hits_r, lang_$lang, cat_$cat, rating_$rating, bussite_$bussite, date) values(&#391;',&#391;',&#391;',&#391;',&#391;','$today')";

$result_6_2 = mysql_query ("$qq_2");

if (!$result_6_2){
$err_msg_sql_6= mysql_error();
$err_loc_6="$PHP_SELF"." // Query6: update totals_r";
}
}

Phpinfo() Shows MySQL From CMD Line, But Not In Browser
Configuration:
Windows 2000 Server
IIS 5.0 PHP set to run with the isapi.dll
PHP 5.0.4
MySQL 4.1

IUSR_servername has Read, Execute access to php and ext

Lines from php.ini

; Directory in which the loadable extensions (modules) reside.
extension_dir ="./ext/"

extension=php_mysql.dll is uncommented

Still, trying to load phpmyadmin gives

cannot load mysql extension;
please check PHP configuration
Documentation

phpinfo() run from a CMD prompt shows MySQL support
phpinfo() run from a script in IIS does not

Email Script/Javascript Parse Error: Syntax Error, Unexpected T_STRING
I've made a email script to include javascript. Now what I want to do, is that I want to hide the link in status bar when I hover over it. I've implemented javascript into the code but I keep getting the following error:

Parse error: syntax error, unexpected T_STRING in /home/****/public_html/fbmail/contact.php on line 12

Here is line 12:
$message .= '<a href="http://www.mysite.com/" onMouseOver="window.status='Click here to continue.'; return true;" onMouseOut="window.status=''; ">Click here to continue ..</a>'; The complete code:

Parse Error: Syntax Error, Unexpected T_ENCAPSED_AND_WHITESPACE, Expecting T_STR
I am having troubles entering this info into my db. Cna someone help? This is the error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/realfina/public_html/ec/testdobaapi.php on line 22 Code:

Parse Error: Syntax Error, Unexpected '?' In /home/**/public_html/website_
Parse error: syntax error, unexpected '?' in /home/realfina/public_html/website_builder/phpcb/filgen.php on line 373

Can someone explain what this means?

Parse Error: Syntax Error, Unexpected T VARIABLE In
I can't figure this out I am posting the script as well if you see something wrong please send an email.

=====================================
<?php
$nume = $_POST['nume']
$prenume = $_POST['prenume']
$adresa = $_POST['adresa']
$telefon = $_POST['telefon']
$mobil = $_POST['mobil']
$A = $_POST['A']
$B = $_POST['B']
$C = $_POST['C']
$CE = $_POST['C+E']
$D = $_POST['D']
$zi = $_POST['zi']
$luna = $_POST['luna']
$an = $_POST['an']
$email = $_POST['email']
$comentarii = $_POST['comentarii']
$ip = getenv("REMOTE_ADDR");

$msg = "Nume: $nume
Prenume: $prenume
Adresa: $adresa
Telefon fix: $telefon
Mobil: $mobil
Categoria A: $A
CategoriaB: $B
CategoriaC: $C
CategoriaC+E: $CE
CategoriaD: $D
Data Nasterii: $zi-$luna-$an
IP: $ip";
$to = "email@example.com";
$subj = "candidat nou";
$from = "www.example.com";
mail ($to, $subj, $msg, $from);
header("Location: success.htm");
}
?>
===================================
error is Parse error: syntax error, unexpected T_VARIABLE in D:xampphtdocsestauto schoolsite_flashsend.php on line 4

Parse Error: Syntax Error, Unexpected T_OBJECT_OPERATOR
I got following error:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /xxx/xxx/public_html/xxxx/GeteBayOfficialTime.php on line 49

what's wrong with my syntax? GeteBayOfficialTime.php required be runned at PHP 5.x.x., but my web host said support php 4.4.4. I don't know whether I got error because this reason. Code:

Parse Error: Syntax Error, Unexpected $end In C:wampwwwsitescismv1
I keep getting a "Parse error: syntax error, unexpected $end in c:wampwwwsitescismv1contacts.php on line 227". Line 227 is the end of my code. From what I can tell from searching the web, it appears that there is something that is not concantenated correctly. I cannot find it though. Can anyone else see it?

Parse Error: Syntax Error, Unexpected $end In ..
The error message Parse error: syntax error, unexpected $end in FILE on
line X is one I run into frequently and I know the cause is I missed an
ending quote.

Is there an easy way to determine where the inital " started? I find
myself adding /* */ blocks or cutting/pasting sections of code out in
order to find where the error occured.

Wouldn't it it be nice if the warning message included the line in teh
source where the initial quote occured?

for example say this is my code
<?
function Build_Query(....)
code...

$my_query = "SELECT BLAH FROM ; (line 15)

more code...

} (line 100)
EOF

and you got

Parse error: syntax error, unexpected $end in MYFILE on line 100
started on line 15

Redirect Error Reported As SQL Syntax Error
I just spent way too much time trying to track down an error that was incorrectly reported just now, and I would like to see if someone can explain to me why it was reported that way.

The purpose of the code is simply to delete a record and then redirect back to the page where the delete was started. The code looks like this:

elseif ($_GET[action] == "delete")
{
$query = "delete from product_subcategory2 where product_sku=$_GET[product_sku] and subcategory2_id=$_GET[subcategory2_id]";
$result = mysql_query($query) or die (mysql_error());
$affected_rows = mysql_affected_rows();

if ($affected_rows == 1)
{
header("Location:product.php?action=edit&product_sku=$product_sku");
}
else
{
do_header();
echo("<center><p class="body">Unable to delete Subcategory2. Please try again.</p>");
echo("<a href="product.php?action=edit&product_sku=$product_sku">Edit Product</a>");
do_footer();
}
}

The SQL was find, but the error I had was in the header line. What I had was this:

header("Location:product.php?action=edit&product_sku=<?php echo $product_sku?>");

so since I was already in PHP, I didn't need the "<?php echo" for $product_sku.

Parse Error: Syntax Error, Unexpected
Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/hawkwebd/public_html/buy.php on line 2
what does this mean

ERROR: Invalid Identifer @ 726 - MYSQL ERROR
I am trying to insert this query, I inserted it directly with SQL in phpmyadmin to see what the exact error was

I'm running SQL 4

QuoteError
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Invalid Identifer @ 726 Code:

Query Syntax Issue
I have a query in my php file but i keep getting a syntax error but not sure what the syntax is precisely... this is what i got:

$query = mysql_query("INSERT INTO `hospital` (HospitalID,CountryID,UserID,Time,When,IllnessType)
Values ('1','1','$ID','7200','$Date','Autumn Flu')")
or die(mysql_error());

And i get:
QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'When,IllnessType) Values ('1','1','72','7200','2007-11-11 23:19:59','Autum' at line 1

Just to add Time = Integer and When =date("Y-m-d H:i:s",time()); format just so you know encase you might have thought it was my time input.

Query MySql Using PHP
I've created my first search form and it seems everything is working pretty well. However, since I am very novice in scripting in general, I'm having one problem that I can't seem to unearth an answer to. Perhaps someone could easily offer the answer:

my query asks to select a 2 char state code or a 5 digit zip code in order to obtain results desired. In testing, if I enter a state code, it brings up only the state requested. However, when I enter a zipcode, I get the wrong results. I'm sure its the "LIKE" that is throwing this off. Here is the query portion of the script:

$result = mysql_query ("SELECT * FROM fish_dealers
WHERE Zip = ´$Zip%´

OR State LIKE ´$State%´
");


Can anyone give me a clue?

Mysql Query
I have wrote a Select statement, that checks if the user and password and returns a value, however can i add something to the statement that would allow me to get the userID from the table users, so that i can write the value to a cookie, is it possible. PHP Code:

MySQL Query
I want to have a field where I store a list of what categories that
particular row falls under, I don't know which format to do or how I
would query it.

For example, row1 might belong to categories 1, 3 & 7 - I'd want to be
able to query all rows belonging to 3 and get row1.

AND And OR In MySQL Query
I've build a query from a php form where people van select more results for a cell wich can only contain one value Here's my query:

SELECT * FROM person WHERE color_eye = ('brown') OR color_eye = ('black') AND color_hair = ('Blonde')

Everything after the "OR" will be ingnored. So how can I tell MySQL I want all the brown and blacked eye?? Without the AND it works fine, but in real the query is way longer with multiple AND's.

Mysql Query
I have a code that installs some tables into a mysql database. Heres the code, but it keeps coming up with the error "Install failed (ID 1)" I have tried tons of things, even looking at other installers and mimicking them, but nothing. PHP Code:

Php/mysql Query
I want to display the users name on the pages when they have logged into my site. i have done it one way that is to take what they type in the login form and post it on the page and that works fine. only one problem and its more of a preference than a problem but the way i did it takes exactly what they type say "username" and posts that so if they type "UsErNaMe" it will post it like that. i want to show the name exactly as they make it when signing up. im guessing i have to query the data base... mine being MYsql. PHP Code:

Mysql Query
How can I get rownum using MySQL queries ,
In Oracle one can you in this way SELECT rownum as srno, fname FROM
tablename
suppose If there are 45 records and if i use while for the

srno should display 1, 2, 3, ... 45

query like SELECT rownum as srno, fname FROM tablename

I dont want to use php counter, i want it from query

Mysql Query
I'm running a sports pool and I'm trying to display stats from the
results of the picks.

The table is 'results' and the fields are 'pick_number', 'game_number',
'user_id', 'points' and 'date'

There is one record for each users' pick. 0 points are given for a loss
and 1-4 points are given for a win. I've already created a query that
gives me the top players by overall points but I'd like to expand that
to include the number of points won just this week, overall winning %
and winning % this week. Can I do this in one query and then display in
an HTML table?

$query = "SELECT user_id, SUM(points) AS points FROM results GROUP BY
user_id ORDER BY points DESC";

Mysql Query
1) i have a database divinelive_messages table with a sessid column
2) i need to find out rows from the database, which only show that sessid in there once.

Mysql Query With * And +
im trying to return all results that come from or went to certain extensions on our phone logging system but i don't want to return any that have a src or dst that contain a * or a +. This is the where statement i have that is not working Code:

Getting MySQL Query
I took some info out of my database.  I want to display an error page if their are no rows in the database.  How would I go about doing that. I have this:

$query = I execute my query here.  Taken it out so you don't connect to my database Muahahahhaah

$row = mysql_fetch_row($query)

if ($row == '')
{
echo 'Their is nothing in the database!';
}else{
echo 'Yes, the database does home info in it.';}

What would I put to make this work?

MySQL Query
Whats wrong with this query:

SELECT from, subject, message, time FROM user_messages WHERE username='$username' ORDER BY timestamp DESC

I get this error:
QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from, subject, message, time FROM user_messages WHERE username='Drezard' ORDER B' at line 1

MySql Query
I'm having some difficulty formulating  query that will allow me to retrieve the details of a specific user in the database. The user's information is stored in one table called Users and another called UserProfile. Both tables are linked by the UserID field.

My current query returns a Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource and my knowledge of Mysql is not great(Still learnng)

Here is my code:

Need Help With Basic Php Mysql Query
$z = "goodBMW"; the word goodBMW is no where to be found in in the table times. but it will echo every single row thats in that table and it doesend sort between Group 1 and Group 2 where the hell is my query wrong.

Problematic MySQL Query
Would anyone be able to help me with the following MySQL problem. I am
trying to extract all of the users who are not on vacation for a given
date. I am using a NOT IN statement, however, I need to have a more
advanced query than a simple one. What I need to do is as follows
SELECT users.user_id,...

MySQL Query Quandry
I have a simple need to go into a 4 column table and based on the content of the first 3 print the content of the 4th. In other words if column1 = a, column2 = b, and column3 = c then print "dog" from column4. This will be the action for a short form that allows the user to make 3 choices that will determine a link. I have this from another script that I'm trying to modify:

mysql_select_db('search_links');
$query = "select * from links ";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo '<p>Number of books found: '.$num_results.'</p>'
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
echo '<p><strong>'.($i+1).'. Title: '
echo htmlspecialchars(stripslashes($row['type_prop']));
echo '</strong><br />Author: '
echo stripslashes($row['area_code']);
echo '<br />ISBN: '
echo stripslashes($row['price_range']);
echo '<br />Price: '
echo stripslashes($row['saved_link']);
echo '</p>'
}

The above query prints the entire table and I would like a query that limits to the form choices indicated above.


Copyright © 2005-08 www.BigResource.com, All rights reserved