- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
29 Posted Topics
Re: this query below will only show names which comes more than once.. Instead of outputting all the name with number next to it.. hope this helps SELECT name, count(number_owned) FROM some_table s GROUP BY name HAVING count(number_owned) > 1 | |
Re: you are not binding parameters in the update query. line 63 | |
Re: you are not binding parameters in the update query. | |
Hi Thank you in advance for the replies I will be getting.. Much appreciated. Basically I am running the following mysql query using PDO UPDATE users SET password = AES_ENCRYPT(:password,:supersalt) Now the issue is.. on one computer I am getting ¶z8Ibﶘé®òŒdY in the password field but on another its blank. … | |
Re: depends on what you want to do and how to respons is formatted.. ![]() | |
Hi I have a mysql tables shown below:  I need to build a query to select all groupnames a user belongs to in a single field seperated by ',' e.g. I wanted to following results id fname lname groups 1 connor Faulkner group_one,group_two 2 Maisie Yates group_four,group_three Just … | |
Re: I think it should be something like: while ($catROW = mysqli_fetch_array($selcat,MYSQLI_ASSOC)) { Code example is here https://www.w3schools.com/php/func_mysqli_fetch_array.asp | |
Re: you should do all the things @AndrisP has stated and plus the following: check if connected to the database, e.g. if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } after `if ($result)` you should do: `$rowcount=mysqli_num_rows($result);` then `if($rowcount == 1)` then assign the username to session. | |
Re: I think `isset($_POST["vote_".$ID])` is not set in $_POST check if that variable exists in `$_POST` `var_dump($_POST);` | |
Re: I would double check if $_SESSION['user_id'] has anything in there... If the user does not exist then the affected_rows will be 0 It could be that the data you want to update already matches the data that you are passing.. so no need to update.. therefore the affected_rows will be … | |
Hi not sure if this is possible so wanted some guidance.. I have a database with 3 columns.. id, data,timestamp id is auto increment and data is json array and timestamp is unix timestamp.. the field I wanted to update was data but I wanted to replace just a part … | |
Re: I would suggest you use javascript/jquery to validate data if null etc.. trim the input so no spaces in username and password before validating at javascript and if all valid send to server.. when data arrives at server check username exists.. if not add error in an array.. and loop … ![]() | |
Re: I agree with Diafol. You have an array with passwords and you are checking the possword against the password that is entered is not efficient.. Like Diafol said you would hash the password. Store the hash into the database and then when the user enters a password you hash the … ![]() | |
I have a soap call which returns an object which has a xml string. an example is shown below: <?xml version="1.0" encoding="utf-16"?> <LoginResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <StatusCode>1</StatusCode> <StatusMessage>Login Successful</StatusMessage> <AuthKey>b2365767-ae42-1a44a6436575</AuthKey> </LoginResponse> I would like it to convert it into an associative array which will be similar to: array( "LoginResponse"=>array( "StatusCode"=>1, "StatusMessage"=>"Login … | |
Basically I am woking on this project where I have been given an api. the maximum number of times i can access is 20 calls per second I need to call this api say 500 times I can do simple loop which is foreach($test as $call){ //call api using $call … | |
Hi currently trying to fighure out how i would need to solve this task... I have a database table which has lots of records and each record will have a parent id attached... e.g. Table_1 ----------------------------------- id name parent 1 test1 4 2 test2 3 3 test3 4 test4 2 … | |
Hi I was taught not to use global variables and one of my friend is using global variable for database handle for his website... could you please explain if there is an issue if he uses global variable for database handle? he is using it to access database from anywhere … | |
Hi all I know how to sort an array but I dont know how to sort an array according to a value in the second array... <?php $array1 = array( array('name'=>'01','number' => 1), array('name'=>'07','number' => 7), array('name'=>'05','number' => 5), array('name'=>'06','number' => 6), array('name'=>'02','number' => 2), array('name'=>'03','number' => 3), array('name'=>'11','number' => … | |
Re: ajax is very easy to use. you just need to learn the basic JavaScript. I've learnt it from youtube videos and "api.jquery.com" (original jquery website and click on api) look for tutorials on youtube with most views because these are most popular and well explained. | |
Hi Im new to JQuery and sorry if this question sounds silly. my question is what is the difference between $.ajax and $.post and which is best if I am posting some form to a php and retriving some values on the same page as the form e.g. contact us … | |
Basically my table Itinerary table where a record can have a parent record. so table cound have ID Parent ID which can be any ID from The same table. Other details Parent ID can be null if the record doesn't have child. and if i delete the parent record of … | |
Re: does the above code give you results..? i mean does it output product name, good price, ... etc? if not could it be `mysql_select_db("table") or die(mysql_error());` you should have database name where you written table? | |
Hi guys, I've built a basic MVC framework for my app it works as follows the app is accessible using only one file which is index.php then it generates the pages required in the backend and then store it in a variable and then echos it out. so if i … ![]() | |
Re: urtrivedi I think this needs to be planned before you do anything e.g. how many tables in sql db what fields do you need html css and queries php it takes time!! you will get help if you take an attempt at it | |
Hi Im trying to create a web based quotation system with php and mysql. I wanted to create something like shopping basket where people store the items and when they click generate quote the system will display the quote of the items and qty selected. Only when the person has … | |
Re: you may need to use javascript to disable the dropdown menu [url]http://www.javascriptkit.com/javatutors/deform3.shtml[/url] | |
![]() | Re: [code=php] //keep the whole path including the filename inside the $filename //this may be users/$userid/images/filename if (file_exists($filename)) { $image = $filename; } else { $image = $default_image; } [/code] Im not sure if this is what you need?? |
Re: [code=sql] SELECT `contents_table.content_id`, `contents_table.content_title`, `contents_table.content_description` From `contents_table`, `categories_table`, `selection_table` WHERE `selection_table.selection_id` = selectedID AND `selection_table.selection_id` = `categories_table.selection_id` AND `categories_table.category_id` = `contents_table.category_id` [/code] I think this should do it | |
I'm new to regular expressions. could any one suggest where to start and any tutorials or books they can recommend. Also need to start learning frameworks I'm good with PHP with mvc pattern but need to learn RegX and frameworks is Zend good? ![]() |
The End.