| |
| |
| |
|
Page: 1 2 3 4 5 6
Comments:
<0> hi. <0> what is the best way to create a database consisting of vendors ? <0> ie: All vendors in one list, or listed under catagories ? <1> can anyone tell me what's wrong with these two consecutive statements? <1> $member_id_query_str = "SELECT member_id FROM member WHERE email='$email'"; <1> $member_id_query = mysql_query ($member_id_query_str); <1> anyone? <2> ? <1> do you know what's wrong with these two consecutive statements? <1> $member_id_query_str = "SELECT member_id FROM member WHERE email='$email'"; <1> $member_id_query = mysql_query ($member_id_query_str); <2> check to see if there was an error <1> there wasnt <2> use or die(mysql_error()) on the query <2> mysql_query($member_id_query_str) die(mysql_error()); <2> err
<2> mysql_query($member_id_query_str) or die(mysql_error()); <1> k i'll try that <1> it doesnt generate an error <1> but it doesnt work properly either <2> how is it supposed to work <2> are you sure thre's a value in $email? <2> echo "SELECT member_id FROM member WHERE email='$email'"; <2> what's it say <1> yes <2> it says yes? <1> because it works when I do $receiver_member_id_query = mysql_query ("SELECT * FROM mail WHERE rcvr_member_id='$member_id'"); <1> but not when I do $str = "SELECT * FROM mail WHERE rcvr_member_id='$member_id'"; <2> that's not what you pasted earlier <2> hehe <2> look at the diffrences <1> and then $receiver_member_id_query = mysql_query ($str) <2> you are selecting data from 2 different tables <1> I know <1> I meant to paste the second one <2> well, is member_id an int? <1> yep <2> in the database? <1> yep <2> first off <2> rcvr_membe_id is a column of 'mail' ? <2> member <1> yes <2> "SELECT * FROM mail WHERE rcvr_member_id = ". $member_id; <2> it should very well throw an error otherwise <2> if in fact, rcvr_member_id is an int <1> hmm... not sure why it didnt output an error <2> and you compare it agains a string <2> against <2> err, can't type <3> hi can someone please help me? <4> what was my quit message? <3> woops read the topic sorry <3> i keep getting these 2 errors <2> client closed connection <3> Warning: fread(): supplied argument is not a valid stream resource in /usr/home/users/40/evon/www/www.evon.be/news.php on line 113 <2> the file wasn't opened properlly <3> when i go to line 113 i don't see a problem <3> http://pastebin.ca/47838 <3> theres the code can anyone help me please? <2> try... <2> if ($fp = fopen($backend, "r")) { while (..) { .. } } <2> and put the fclose inside the if <2> if ($fp = fopen($backend, "r")) { while (..) { .. } fclose($fp); } <2> but that will just stop the error. make sure $backend is a valid path to your file <3> Parse error: syntax error, unexpected '.' in /usr/home/users/40/evon/www/www.evon.be/news.php on line 121 <2> tell me you didn't copy that code exactly <3> i'm not good in php :$ <2> *sigh* <2> you can try to use your brain... just a little <3> i thought the dots were wrong lol <3> sorry <3> while (...) what can i put there? <2> http://pastebin.ca/47839 <2> heh, what you have already <2> but like i said <3> i love u!
<3> LOL <2> make sure $backend is a valid path <3> it worked! <2> well, it got rid of the warning <3> $backend = $_POST['backend']; <3> thgeres the backend, how would i kno if it's valid? <2> if (file_exists($backend)) would be 1 way, but if it doesn't exist, then the fopen will fail, and that while loop will never execute <2> you could say <2> if (!file_exists($backend)) { echo "in valid file path"; } <3> ill try that <3> yea it did error lol <3> that isn't too much of a problem as long as the error doesn't display lol <2> what did it error? <3> " invalid file path <3> lol <2> oh man <1> create_vibe: I can get it to work perfectly using $receiver_member_id_query = mysql_query ("SELECT * FROM mail WHERE rcvr_member_id='$member_id'"); <2> it's your turn to do what you want with that code i just gave you <3> erm lol <2> well, if it's an invalid path, saksase, then a message needs to come back to the user <3> o:S <3> let me see again <1> ahh ****... I think I was missing the single quotes <2> Etobicoke27m, sorry. the syntax is correct, it's something do with the values you are giving it and the values in the db <2> Etobicoke27m, but if the member_id column in the database is an int, then you should not have the single quotes around the value <1> it only works WHEN I have single quotes around the variable <2> then your member_id is some type of string, varchar, text, etc. <1> shouldnt it be $str = "SELECT * FROM mail WHERE rcvr_member_id ='" . $member_id; . "'"; <2> no <3> Warning: Wrong parameter count for file_exists() in /usr/home/users/40/evon/www/www.evon.be/news.php on line 109 <3> in valid file path <1> without the ; after $member_id <3> woops sorry thats nothing just fixed <2> Etobicoke27m, it says the same thing <2> i just like to concatinate cause that's how you do in every other syntax <1> all of the member_id columns are type int(8) <3> create vibe everything works now <2> saksase, awsome <1> this works fine --> $receiver_member_id_query = mysql_query ("SELECT * FROM mail WHERE rcvr_member_id='$member_id'"); <1> however if I remove the single quotes it does not work <2> <2> then your member_id is some type of string, varchar, text, etc. <1> ok.... well I stored it in a variable... so it must turn it into a string then <2> IN THE DATABASE <3> lol <3> lolol <1> if the column is type int how would it store it as a string in the db ? <2> it doesn't <2> and if it is type in in the database, DO NOT USE SINGLE QUOTES when validating its value <2> *type int <1> I pulled member_id straight from the db and stored it in $member_id <2> that's fine <1> so I dont know how it got turned into a string <2> no no no <2> d0od <2> create table my_table (id int) <2> id is an int <1> yep <2> insert into my_table (id) values (5) <2> works <2> insert into my_table (id) values ('5') <2> does not <1> right <1> but then why does my statemnt only work with single quotes ? <2> you are doing something wrong <1> $member_id must be an int <1> $member_id = $member_id_array[member_id]; <1> that's where I store it in a variable <2> it will be what it is stored as in the db <1> yep... int(8) <1> so after that $member_id = $member_id_array[member_id]; statement <1> I have $receiver_member_id_query = mysql_query ("SELECT * FROM mail WHERE rcvr_member_id='$member_id'"); <1> and it works fine <2> heh <1> but if I remove the single quotes it doesnt
Return to
#php or Go to some related
logs:
#allnitecafe corcı 3arabe +chat in the jungle the mighty jungle the lion sleeps tonight-mp3 #india Tutkey guys #chat-world ABHISHEK PICH #kl #vb
|
|