RE: [PHP-DB] Simple database error [DONE!!-Thanks] <EOM>

From: Date: Fri, 31 Aug 2001 00:38:12 +0000
Subject: RE: [PHP-DB] Simple database error [DONE!!-Thanks] <EOM>
Groups: php.db 
Request: Send a blank email to php-db+get-12011@lists.php.net to get a copy of this message
oo okay it's working right now ! thank you so much ! --- "Dave Watkinson" <d.watkinson@mightymatch.com> > wrote: >OK, try this > > >$db =3D mysql_connect("localhost", "xxxx","pass"); > >mysql_select_db("mydatabase_com",$db); >$result =3D mysql_query("SELECT * FROM big_member WHERE position=3D'Squads' >ORDER by first LIMIT 0,300",$db); > >while ($myrow =3D mysql_fetch_row($result)) { > $link_string =3D urlencode($myrow[3]); > echo "<a >href=3D\"m_template.php?nick=3D$link_string\">$myrow[3]</a>"; >} > >and you shouldn't really be doing a SELECT * - just name the columns you >really need :-) > > > > >-----Original Message----- >From: Nagasea [mailto:nagasea@kaskus.com] >Sent: 31 August 2001 01:01 >To: Brunner, Daniel; 'nagasea@kaskus.com' >Cc: PHP List (E-mail) >Subject: RE: [PHP-DB] Simple database error (SPACE) > > >it's still not working :( > >maybe u need my script to see > >$db =3D mysql_connect("localhost", "xxxx","pass"); > >mysql_select_db("mydatabase_com",$db); >$result =3D mysql_query("SELECT * FROM big_member WHERE position=3D'Squads' >ORDER by first LIMIT 0,300",$db); > >while ($myrow =3D mysql_fetch_row($result)) { >echo(" ><a href=3Dm_template.php?nick=3D$myrow[3]>. $myrow[3] ."</a>"); > >} > >I need to make $myrow give the result exactly from the database >(including the space) > >--- "Brunner, Daniel" <daniel.brunner@duni.com> >> wrote: >>Hello!!! >> >> >>Use mysql_fetch_object... >> >> >>$myrow->WHATEVER >> >> >>Whatever =3D whatever the field name is.... >> >> >> >>Dan >> >> >> >> >> >> >> >> >> >>> ---------- >>> From: Nagasea >>> Reply To: nagasea@kaskus.com >>> Sent: Thursday, August 30, 2001 5:01 PM >>> To: php-db@lists.php.net >>> Subject: [PHP-DB] Simple database error (SPACE) >>>=20 >>> //-- Anybody can help me with this problem (I think >>> //-- it's simple but im to stupid to know the answer) >>>=20 >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= >=3D >>> while ($myrow =3D mysql_fetch_row($result)) { >>> echo(" >>> <a href=3Dm_template.php?nick=3D$myrow[3]>$myrow[3] ."</a>"); >>> } >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= >=3D >>>=20 >>> If I have a database in $myrow[3] and it has "space", it didn't work. >>>=20 >>> Example Database : John Doe >>> __________________________________________________ >>>=20 >>> it will shown=20 >>> m_template?nick=3DJohn >>>=20 >>> I NEED PHP to show the space and Doe also >>> so it's suppose to be : >>>=20 >>> m_template?nick=3DJohn Doe >>>=20 >>>=20 >>>=20 >>> _____________________________________________________________ >>> www.kaskus.com - FREE EMAIL SERVICE >>>=20 >>> --=20 >>> PHP Database Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net >>> For additional commands, e-mail: php-db-help@lists.php.net >>> To contact the list administrators, e-mail: >>> php-list-admin@lists.php.net >>>=20 >>> > >_____________________________________________________________ >www.kaskus.com - FREE EMAIL SERVICE > >--=20 >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net >For additional commands, e-mail: php-db-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net >For additional commands, e-mail: php-db-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net _____________________________________________________________ www.kaskus.com - FREE EMAIL SERVICE

« previous php.db (#12011) next »