Jump to content

Recommended Posts

if your functions are unique say you want to do function eat an apple then don't pass its title but pass its functionID number in mysql across then you are always sure you get the right result.

A varchar compare has 100 more ways to fail than an integer to integer compare

Link to comment
https://forums.phpfreaks.com/topic/100005-select-not-working/#findComment-511421
Share on other sites

Is there more code than that cause you won't get much from just that just the resource id which doesn't mead much.

 

This will list field name and value

<?php
$sql = "SELECT * FROM `roster` WHERE sort = 1";
$res = mysql_query($sql) or die(mysql_error());
$r = mysql_fetch_assoc($res);
foreach($r as $key => $val){
echo "$key = $val<br />";
}
?>

 

Ray

Link to comment
https://forums.phpfreaks.com/topic/100005-select-not-working/#findComment-511427
Share on other sites

Well... The line above just includes the database connection information.

 

I don't want to pass an ID number, because the manual I am making has the same "Format" as PHP.net, where you just type in: http://sitename.com/random or http://sitename.com/abs and it will take you to that function.

 

I have never had this issue before...

Link to comment
https://forums.phpfreaks.com/topic/100005-select-not-working/#findComment-511443
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.