Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 04-29-2006, 12:10 PM   #1 (permalink)
Junior Member
 
Join Date: 02-17-06
Posts: 3
iTrader: 0 / 0%
Latest Blog:
None

songwritingfever is on the right pathsongwritingfever is on the right pathsongwritingfever is on the right path
mysql query problem (php)

first things first, I'm really REALLY new to all this...

so, vriable 'name" are passed through URL to file.php

(http://www.domain.com/file.php?name=John Smith)

So what's wrong with this query?!...It says there's an error near "John Smith" (that is when name=john smith)


..........
<?php
$connect = mysql_connect ("anthing", "'anything", "anything") or
die ("Error: Couldn't connect to database server");
mysql_select_db ("anything");
$query = "SELECT title, categ, id
FROM articles
WHERE name LIKE "$name";
$result = mysql_query($query);

......
(the code is in file.php of course)
I know this question is most likely very simple, but I'd appreciate the help a lot...thanks
songwritingfever is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which one faster mysql query? smith Coding Forum 7 03-29-2007 05:41 AM
MySQL Query Question Thanol Coding Forum 6 01-17-2006 01:06 PM
Mysql Query & HTTP_POST_VARS onlinegamenet Coding Forum 4 03-01-2005 10:19 AM
MYSQL Update Query Limit Coding Forum 1 12-26-2004 10:08 PM
mysql / php search query robpicken Coding Forum 0 07-28-2004 05:26 AM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 09:35 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.