PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
i just want to print on a page something that is found in my database, i used
and its not working , who can help me fixing it ? (seems its not understanding the "mysql_fetch_array" and i dont know php to fix it .. i just want to pring this:s anyone can help?
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
[quote="[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1"][b]2.[/b] Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.[/quote]
[quote="[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1"][b]1.[/b] Select the correct board for your query. Take some time to read the guidelines in the sticky topic.[/quote]
General Discussion
Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
the error is :
warning: mysql_fetch_array(): supplied argumant is not a valid MYSQL resuly resource in C:\programfiles\vertrigoServ\www\test.php on line 16
Your code is missing a number of error catches. Check the PHP Manual for using die() in combination with mysql commands to capture and report errors. Until these are added, it's hard to say what has gone wrong.
Also, why are you using the user/password explicitly after you went and defined constants for their usage?
volka , 1st of all a BIG thank you:) i really appreciate ur work and how fast u r
2nd , the "where username= a " part , i mean that i need like the custID and Email for the person who's username is "a" got me ?
anyway 1 more question , can i get ur msn so that if i have some small pbs with php i can ask u?(i can help u in java,c,c++... but dont know any php thats the pb..
anyway if u prefer talking on website its ok:)
because everyone has lots of small problems I don't have a msn/yahoo/whateverIM anymore
--
string literals (including 1-char literals like a) have to be marked for mysql as well as for php.
try
$query = "SELECT UserName, CustID, Email FROM customer WHERE UserName='a' ";
That exactly matches a and maybe A (depending on the field definition including the keyword binary or not).
If you want all UserNames starting with a you need WHERE UserName LIKE 'a%'
big thanks anyway if u need any questions reguarding java/c/c++ u can pm me im ready to turn it back to u the favor u did for me
this is all the questions for today