Wrox Programmer Forums
|
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 24th, 2004, 12:47 PM
Registered User
 
Join Date: Aug 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nmwebs
Default $link variable

On page 114 (using the table.php) there is a query:

$result = mysql_query($query,$link) or die (mysql_eror());

What is the variable $link there for? When I try to run this code, I get

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\test\TMP27xkr2ypax.php on line 9

When I delete ,$link (and just leave $query there), it runs fine.

 
Old August 24th, 2004, 12:57 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Check the PHP manual.

http://php.net/mysql-connect

HTH,

Snib

<><
 
Old August 24th, 2004, 01:03 PM
Registered User
 
Join Date: Aug 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nmwebs
Default

DUR!

Thank you! The $link was originally created on the second line of the code ($link = mysqp_connect blah blah blah).

I replaced that code with an include that connects to my MySQL. That's why I couldn't find any other references to $link.

Thanks for the help!






Similar Threads
Thread Thread Starter Forum Replies Last Post
comapring global variable value to local variable amhicraig XSLT 6 December 5th, 2007 12:16 PM
Object variable or With block variable not set haidee_mccaffrey Classic ASP Professional 5 March 8th, 2007 03:34 PM
ASSIGNING A JAVA SCRIPT VARIABLE TO A XSL VARIABLE SOMANATHAN10 XSLT 1 February 21st, 2007 04:26 AM
Object variable or With block variable not set tparrish VS.NET 2002/2003 3 May 22nd, 2005 07:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.